| 1008 | } |
| 1009 | |
| 1010 | void fxMeasureThrow(txMachine* the, txMarshallBuffer* theBuffer, txString message) |
| 1011 | { |
| 1012 | txSlot* slot = theBuffer->stack; |
| 1013 | txInteger i = 0; |
| 1014 | txInteger c = sizeof(theBuffer->error); |
| 1015 | i += c_snprintf(theBuffer->error, c, "marshall "); |
| 1016 | while (slot > the->stack) { |
| 1017 | slot--; |
| 1018 | if (slot->kind == XS_AT_KIND) { |
| 1019 | if (slot->value.at.id != XS_NO_ID) { |
| 1020 | txBoolean adorn; |
| 1021 | txString string = fxGetKeyString(the, slot->value.at.id, &adorn); |
| 1022 | if (adorn) { |
| 1023 | if (i < c) i += c_snprintf(theBuffer->error + i, c - i, "[%s]", string); |
| 1024 | } |
| 1025 | else { |
| 1026 | if (i < c) i += c_snprintf(theBuffer->error + i, c - i, ".%s", string); |
| 1027 | } |
| 1028 | } |
| 1029 | else { |
| 1030 | if (i < c) i += c_snprintf(theBuffer->error + i, c - i, "[%d]", (int)slot->value.at.index); |
| 1031 | } |
| 1032 | } |
| 1033 | } |
| 1034 | if (i < c) |
| 1035 | i += c_snprintf(theBuffer->error + i, c - i, ": %s", message); |
| 1036 | c_longjmp(theBuffer->jmp_buf, 1); |
| 1037 | } |
| 1038 |
no test coverage detected