MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / rethrow

Method rethrow

src/simulate/simulate_exceptions.cpp:63–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 void Context::rethrow () {
64#if DAS_ENABLE_EXCEPTIONS
65 throw dasException(exception ? exception : "", exceptionAt);
66#else
67 if ( throwBuf ) {
68#if defined(WIN64) || defined(_WIN64)
69 // "An invalid or unaligned stack was encountered during an unwind operation." exception is issued via longjmp
70 // this is a known issue with longjmp on x64, and this workaround disables stack unwinding
71 ((_JUMP_BUFFER *)throwBuf)->Frame = 0;
72#endif
73
74 longjmp(*throwBuf,1);
75 } else {
76 if ( exception ) {
77 string msg = "\nunhandled exception\n" + exceptionAt.describe() + ": " + exception + "\n";
78 to_err(nullptr, msg.c_str());
79 } else {
80 to_err(nullptr, "\nunhandled exception\n");
81 }
82 stackWalk(nullptr, false, false);
83 os_debug_break();
84 }
85#endif
86#if !defined(_MSC_VER) || (_MSC_VER>1900)
87 exit(0);
88#endif
89 }
90
91 vec4f WIN_EH_NO_ASAN Context::evalWithCatch ( SimNode * node ) {
92 auto aa = abiArg;

Callers

nothing calls this directly

Calls 5

dasExceptionClass · 0.85
to_errFunction · 0.85
os_debug_breakFunction · 0.85
describeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected