diff --git a/src/module/scripting.cpp b/src/module/scripting.cpp index e7f0ba7..4e4853b 100644 --- a/src/module/scripting.cpp +++ b/src/module/scripting.cpp @@ -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());