Error Message Improvement for Host Variables (#116) #168
No reviewers
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#168
Loading…
Reference in New Issue
No description provided.
Delete Branch "err_msg_host_var"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Program1 with error:
previous error msg:
now error msg (location will just be the cpython error location):
Program2 with error:
previous err msg:
now err msg:
Program3 with error:
previous err msg:
now err msg:
@ -178,0 +229,4 @@
) {
Ok(t) => t,
Err(e) => return Some(format!(
"type error of the {}-th parameter when calling kernel function ({})", i, e
Use "parameter #xxx" to avoid problems with "1st", "2nd" and "3rd".
I think it should also say "at parameter #xx" instead of "of..."
@ -162,0 +159,4 @@
let mut ty = match self.get_obj_type(py, list.get_item(0)?, unifier, defs, primitives)? {
Ok(t) => t,
Err(e) => return Ok(Err(format!(
"type error ({}) of the first element of the list", e
"element #1" for consistency
@ -178,0 +234,4 @@
};
if let Err(e) = unifier.unify(in_ty, *ty) {
return Some(format!(
"type error of {}-th parameter when calling kernel function ({})", i, e
same - "at parameter #..."
LGTM. Btw can we also make codegen return results? When I add RPC later, I will have to return an error if the RPC parameter type is not something that we support. Thanks.
Sure, I am now also looking into this issue #152 about debug information. So by debug information it mainly means codegen returning
Result
instead of panic?No. Debug information means this: https://thedan64.github.io/inkwell/inkwell/debug_info/index.html
Oh ok thanks, I will look into this.
223769b8bc
to157a423e3b
157a423e3b
to9d342d9f0f
Rebased on the current master branch and modified the message to
element #XXX
andparameter #XXX