X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/9f62980f827505ed1f231b737ec126dda041a475..993710aae023efaccb75b56eee2347c340bdc71d:/parser_test.cpp/software/bife/bife++.git/blobdiff_plain/9f62980f827505ed1f231b737ec126dda041a475..993710aae023efaccb75b56eee2347c340bdc71d:/parser_test.cpp diff --git a/parser_test.cpp b/parser_test.cpp index 705b165..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,13 +20,22 @@ 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; } catch (exception e) { cerr << "Error: " << e.what() << endl; return 1; + } 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; }