diff --git a/module/Sqrat/sqratAllocator.h b/module/Sqrat/sqratAllocator.h index 294adae7..eae318ca 100644 --- a/module/Sqrat/sqratAllocator.h +++ b/module/Sqrat/sqratAllocator.h @@ -125,6 +125,8 @@ public: SetInstance(vm, 1, ArgFwd{}.Call(vm, 2, [](HSQUIRRELVM /*vm*/, A... a) -> C * { return new C(a...); })); + } catch (const Poco::Exception& e) { + return sq_throwerror(vm, e.displayText().c_str()); } catch (const std::exception& e) { return sq_throwerror(vm, e.what()); } catch (...) { @@ -497,6 +499,8 @@ public: SetInstance(vm, 1, ArgFwd{}.Call(vm, 2, [](HSQUIRRELVM /*vm*/, A... a) -> C * { return new C(a...); })); + } catch (const Poco::Exception& e) { + return sq_throwerror(vm, e.displayText().c_str()); } catch (const std::exception& e) { return sq_throwerror(vm, e.what()); } catch (...) {