X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/e3ac7ebf66f6d10d686c1c572ec81d625f0598e6..993710aae023efaccb75b56eee2347c340bdc71d:/parser_test.cpp/software/bife/bife++.git/blobdiff_plain/e3ac7ebf66f6d10d686c1c572ec81d625f0598e6..993710aae023efaccb75b56eee2347c340bdc71d:/parser_test.cpp diff --git a/parser_test.cpp b/parser_test.cpp index 992d6fe..5cf9ddb 100644 --- a/parser_test.cpp +++ b/parser_test.cpp @@ -1,6 +1,6 @@ // vim: set expandtab tabstop=4 shiftwidth=4: -#include "chit.h" +#include "libbife/chit.h" #include "parser.h" #include #include @@ -20,7 +20,7 @@ int main(int argc, char* argv[]) { cout << "Parser example:" << endl; cout << "===============" << endl; try { - Parser parser; + Parser parser("translate.translate"); parser.parse_file(file); // Text is returned in utf-8 encoding. cout << parser.root->render(tpl) << endl; @@ -30,6 +30,12 @@ int main(int argc, char* argv[]) { } catch (string e) { cerr << "Error: " << e << endl; return 2; + } catch (const char* e) { + cerr << "Error: " << e << endl; + return 3; + } catch (...) { + cerr << "Unknown error!!!" << endl; + return -1; } return 0; }