| 304 | } |
| 305 | |
| 306 | void fx_Error_toString(txMachine* the) |
| 307 | { |
| 308 | txSlot* name; |
| 309 | txSlot* message; |
| 310 | if (mxThis->kind != XS_REFERENCE_KIND) |
| 311 | mxTypeError("this: not an object"); |
| 312 | mxPushSlot(mxThis); |
| 313 | mxGetID(mxID(_name)); |
| 314 | if (the->stack->kind == XS_UNDEFINED_KIND) |
| 315 | fxStringX(the, the->stack, "Error"); |
| 316 | else |
| 317 | fxToString(the, the->stack); |
| 318 | name = the->stack; |
| 319 | mxPushSlot(mxThis); |
| 320 | mxGetID(mxID(_message)); |
| 321 | if (the->stack->kind == XS_UNDEFINED_KIND) |
| 322 | *the->stack = mxEmptyString; |
| 323 | else |
| 324 | fxToString(the, the->stack); |
| 325 | message = the->stack; |
| 326 | if (c_isEmpty(name->value.string)) |
| 327 | *mxResult = *message; |
| 328 | else if (c_isEmpty(message->value.string)) |
| 329 | *mxResult = *name; |
| 330 | else { |
| 331 | fxStringX(the, mxResult, ""); |
| 332 | fxConcatString(the, mxResult, name); |
| 333 | fxConcatStringC(the, mxResult, ": "); |
| 334 | fxConcatString(the, mxResult, message); |
| 335 | } |
| 336 | the->stack += 2; |
| 337 | } |
| 338 | |
| 339 | void fx_AggregateError(txMachine* the) |
| 340 | { |
nothing calls this directly
no test coverage detected