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

Broaden the range of handled exceptions.

This commit is contained in:
Sandu Liviu Catalin 2021-01-31 00:14:56 +02:00
parent d7ce51d8bb
commit 08ae539e74
3 changed files with 11 additions and 11 deletions

View File

@ -125,7 +125,7 @@ public:
SetInstance(vm, 1, ArgFwd<A...>{}.Call(vm, 2, [](HSQUIRRELVM /*vm*/, A... a) -> C * {
return new C(a...);
}));
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -497,7 +497,7 @@ public:
SetInstance(vm, 1, ArgFwd<A...>{}.Call(vm, 2, [](HSQUIRRELVM /*vm*/, A... a) -> C * {
return new C(a...);
}));
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));

View File

@ -122,7 +122,7 @@ template <class R> struct SqGlobal {
#endif
try {
return SqGlobalProxy<R>::template Run<A...>(vm, startIdx);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -148,7 +148,7 @@ template <class R> struct SqGlobal<R&> {
#endif
try {
return SqGlobalProxy<R&>::template Run<A...>(vm, startIdx);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -174,7 +174,7 @@ template <> struct SqGlobal<void> {
#endif
try {
return SqGlobalProxy<void>::Run<A...>(vm, startIdx);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));

View File

@ -152,7 +152,7 @@ template <class C,class R> struct SqMember {
#endif
try {
return SqMemberProxy<C, R>:: template Run<A...>(vm);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -171,7 +171,7 @@ template <class C,class R> struct SqMember {
#endif
try {
return SqMemberProxy<C,R>::template RunC<A...>(vm);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -197,7 +197,7 @@ template <class C, class R> struct SqMember<C,R&> {
#endif
try {
return SqMemberProxy<C,R&>::template Run<A...>(vm);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -216,7 +216,7 @@ template <class C, class R> struct SqMember<C,R&> {
#endif
try {
return SqMemberProxy<C,R&>::template RunC<A...>(vm);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -243,7 +243,7 @@ template <class C> struct SqMember<C, void> {
#endif
try {
return SqMemberProxy<C, void>::template Run<A...>(vm);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));
@ -262,7 +262,7 @@ template <class C> struct SqMember<C, void> {
#endif
try {
return SqMemberProxy<C,void>::template RunC<A...>(vm);
} catch (const Exception& e) {
} catch (const std::exception& e) {
return sq_throwerror(vm, e.what());
} catch (...) {
return sq_throwerror(vm, _SC("unknown exception occured"));