Print detailed evaluation errors
This commit is contained in:
parent
f7384926f0
commit
e2d5c93407
@ -95,6 +95,10 @@ void scripting::initialize()
|
||||
{
|
||||
callback(event->name, arguments);
|
||||
}
|
||||
catch (chaiscript::exception::eval_error &e)
|
||||
{
|
||||
printf("Failed to handle event: %s\n", e.pretty_print().data());
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
printf("Failed to handle event: %s\n", e.what());
|
||||
@ -115,6 +119,10 @@ void scripting::load_scripts() const
|
||||
{
|
||||
this->chai_->eval_file(script);
|
||||
}
|
||||
catch (chaiscript::exception::eval_error &e)
|
||||
{
|
||||
printf("Failed to load script %s: %s\n", script.data(), e.pretty_print().data());
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
printf("Failed to load script %s: %s\n", script.data(), e.what());
|
||||
|
Loading…
Reference in New Issue
Block a user