MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxDebugThrow

Function fxDebugThrow

xs/sources/xsDebug.c:1220–1238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1218}
1219
1220void fxDebugThrow(txMachine* the, txString path, txInteger line, txString message)
1221{
1222 if (the->debugEval)
1223 return;
1224 if (fxIsConnected(the) && (the->breakOnExceptionsFlag))
1225 fxDebugLoop(the, path, line, message);
1226 else {
1227 txSlot* frame = the->frame;
1228 while (frame && !path) {
1229 txSlot* environment = mxFrameToEnvironment(frame);
1230 if (environment->ID != XS_NO_ID) {
1231 path = fxGetKeyName(the, environment->ID);
1232 line = environment->value.environment.line;
1233 }
1234 frame = frame->next;
1235 }
1236 fxReportException(the, path, line, "%s", message);
1237 }
1238}
1239
1240void fxEcho(txMachine* the, txString theString)
1241{

Callers 4

fxRunIDFunction · 0.85
ifFunction · 0.85
fxThrowFunction · 0.85
fxThrowMessageFunction · 0.85

Calls 4

fxDebugLoopFunction · 0.85
fxGetKeyNameFunction · 0.85
fxReportExceptionFunction · 0.85
fxIsConnectedFunction · 0.70

Tested by

no test coverage detected