[Error.Print.begin]
| 252 | |
| 253 | // [Error.Print.begin] |
| 254 | void PrintError(TVMFFIObject* err) { |
| 255 | TVMFFIErrorCell* cell = (TVMFFIErrorCell*)((char*)err + sizeof(TVMFFIObject)); |
| 256 | fprintf(stderr, "%.*s: %.*s\n", // |
| 257 | (int)cell->kind.size, cell->kind.data, // e.g. "ValueError" |
| 258 | (int)cell->message.size, cell->message.data); // e.g. "Expected at least 2 arguments" |
| 259 | if (cell->backtrace.size) { |
| 260 | fprintf(stderr, "Backtrace:\n%.*s\n", (int)cell->backtrace.size, cell->backtrace.data); |
| 261 | } |
| 262 | } |
| 263 | // [Error.Print.end] |
| 264 | |
| 265 | // [Error.HandleReturnCode.begin] |
no outgoing calls
no test coverage detected