mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
interp: show error line in first line of the traceback
This commit is contained in:
committed by
Ron Evans
parent
e5e324f93e
commit
510f145a3a
+3
-1
@@ -47,10 +47,12 @@ func (e *Error) Error() string {
|
||||
// location of the instruction. The location information may not be complete as
|
||||
// it depends on debug information in the IR.
|
||||
func (e *evalPackage) errorAt(inst llvm.Value, err error) *Error {
|
||||
pos := getPosition(inst)
|
||||
return &Error{
|
||||
ImportPath: e.packagePath,
|
||||
Pos: getPosition(inst),
|
||||
Pos: pos,
|
||||
Err: err,
|
||||
Traceback: []ErrorLine{{pos, inst}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user