1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Include special handling for POCO exceptions in constructors.

This commit is contained in:
Sandu Liviu Catalin 2021-04-02 17:59:20 +03:00
parent 1c15090161
commit cb9c5019f8

View File

@ -125,6 +125,8 @@ public:
SetInstance(vm, 1, ArgFwd<A...>{}.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<A...>{}.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 (...) {