mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
py: For viper compile errors, add traceback with function and filename.
ViperTypeError now includes filename and function name where the error occurred. The line number is the line number of the start of the function definition, which is the best that can be done without a lot more work. Partially addresses issue #1381.
This commit is contained in:
@@ -677,7 +677,7 @@ STATIC void emit_native_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scop
|
||||
|
||||
// right now we have a restriction of maximum of 4 arguments
|
||||
if (scope->num_pos_args >= 5) {
|
||||
EMIT_NATIVE_VIPER_TYPE_ERROR(emit, "Viper functions don't currently support more than 4 arguments (while compiling '%q')", scope->simple_name); return;
|
||||
EMIT_NATIVE_VIPER_TYPE_ERROR(emit, "Viper functions don't currently support more than 4 arguments");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user