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

Function fxVReportException

xs/sources/xsDebug.c:2960–2991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2958}
2959
2960void fxVReportException(void* console, txString thePath, txInteger theLine, txString theFormat, c_va_list theArguments)
2961{
2962#ifdef mxDebug
2963 txMachine* the = console;
2964 if (fxIsConnected(the)) {
2965 fxEchoStart(the);
2966 fxEcho(the, "<log");
2967 fxEchoPathLine(the, thePath, theLine);
2968 fxEcho(the, "># Exception: ");
2969 fxEchoFormat(the, theFormat, theArguments);
2970 fxEcho(the, "!\n</log>");
2971 fxEchoStop(the);
2972 }
2973#elif defined(nrf52) && defined(mxInstrument)
2974 char buf[256];
2975 if (thePath && theLine)
2976 c_snprintf(buf, 256, "%s:%d: exception: ", thePath, (int)theLine);
2977 else
2978 c_snprintf(buf, 256, "# exception: ");
2979 modLog_transmit(buf);
2980 c_snprintf(buf, 256, theFormat, theArguments);
2981 modLog_transmit(buf);
2982#elif defined(DEBUG_EFM)
2983 if (thePath && theLine)
2984 sprintf(_debugStrBuffer, "%s:%d: exception: ", thePath, (int)theLine);
2985 else
2986 sprintf(_debugStrBuffer, "# exception: ");
2987 memmove(_lastDebugStrBuffer, _debugStrBuffer, 256);
2988 vsprintf(_debugStrBuffer, theFormat, theArguments);
2989 _debugStrBuffer[255] = '\0';
2990#endif
2991}
2992
2993void fxVReportError(void* console, txString thePath, txInteger theLine, txString theFormat, c_va_list theArguments)
2994{

Callers 1

fxReportExceptionFunction · 0.85

Calls 6

fxEchoStartFunction · 0.85
fxEchoFunction · 0.85
fxEchoPathLineFunction · 0.85
fxEchoFormatFunction · 0.85
fxEchoStopFunction · 0.85
fxIsConnectedFunction · 0.70

Tested by

no test coverage detected