forked from enlightenment/efl
eolian-cxx: Fixed possible exception escaping main
Added try/catch around main to show the reason for the generation failure. @fix CID 1265600
This commit is contained in:
parent
13606c4647
commit
932b6e7463
|
@ -366,10 +366,19 @@ opts_get(int argc, char **argv)
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
efl::eina::eina_init eina_init;
|
||||
efl::eolian::eolian_init eolian_init;
|
||||
eolian_cxx::options_type opts = opts_get(argc, argv);
|
||||
eolian_cxx::database_load(opts);
|
||||
eolian_cxx::run(opts);
|
||||
try
|
||||
{
|
||||
efl::eina::eina_init eina_init;
|
||||
efl::eolian::eolian_init eolian_init;
|
||||
eolian_cxx::options_type opts = opts_get(argc, argv);
|
||||
eolian_cxx::database_load(opts);
|
||||
eolian_cxx::run(opts);
|
||||
}
|
||||
catch(std::exception const& e)
|
||||
{
|
||||
std::cerr << "EOLCXX: Eolian C++ failed generation for the following reason: " << e.what() << std::endl;
|
||||
std::cout << "EOLCXX: Eolian C++ failed generation for the following reason: " << e.what() << std::endl;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue