Created
November 15, 2017 16:00
-
-
Save timo/d60cefdbd100d097eec78663b5a97b26 to your computer and use it in GitHub Desktop.
write_fhb error message improvement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/io/io.c b/src/io/io.c | |
index 5762f0666..be92c0af6 100644 | |
--- a/src/io/io.c | |
+++ b/src/io/io.c | |
@@ -141,7 +141,7 @@ void MVM_io_write_bytes(MVMThreadContext *tc, MVMObject *oshandle, MVMObject *bu | |
MVM_exception_throw_adhoc(tc, "write_fhb requires a native array to read from"); | |
if (((MVMArrayREPRData *)STABLE(buffer)->REPR_data)->slot_type != MVM_ARRAY_U8 | |
&& ((MVMArrayREPRData *)STABLE(buffer)->REPR_data)->slot_type != MVM_ARRAY_I8) | |
- MVM_exception_throw_adhoc(tc, "write_fhb requires a native array of uint8 or int8"); | |
+ MVM_exception_throw_adhoc(tc, "write_fhb requires a native array of uint8 or int8, but got %s", MVM_6model_get_debug_name(tc, buffer)); | |
output = (char *)(((MVMArray *)buffer)->body.slots.i8 + ((MVMArray *)buffer)->body.start); | |
output_size = ((MVMArray *)buffer)->body.elems; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment