mirror of
https://github.com/janet-lang/janet
synced 2025-11-14 06:17:15 +00:00
Improved various error messages when handling unexpected types.
error: bad slot #1, expected string|symbol|keyword|buffer, got ... error: bad slot #1, expected a string, symbol, keyword or buffer, got ... bad s64 initializer: "donkey" can not convert string "donkey" to s64
This commit is contained in:
@@ -736,7 +736,7 @@ static void pushtypes(JanetBuffer *buffer, int types) {
|
||||
if (first) {
|
||||
first = 0;
|
||||
} else {
|
||||
janet_buffer_push_u8(buffer, '|');
|
||||
janet_buffer_push_cstring(buffer, (types == 1) ? " or " : ", ");
|
||||
}
|
||||
janet_buffer_push_cstring(buffer, janet_type_names[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user