interp: show error line in first line of the traceback
Этот коммит содержится в:
родитель
e5e324f93e
коммит
510f145a3a
1 изменённых файлов: 3 добавлений и 1 удалений
|
@ -47,10 +47,12 @@ func (e *Error) Error() string {
|
||||||
// location of the instruction. The location information may not be complete as
|
// location of the instruction. The location information may not be complete as
|
||||||
// it depends on debug information in the IR.
|
// it depends on debug information in the IR.
|
||||||
func (e *evalPackage) errorAt(inst llvm.Value, err error) *Error {
|
func (e *evalPackage) errorAt(inst llvm.Value, err error) *Error {
|
||||||
|
pos := getPosition(inst)
|
||||||
return &Error{
|
return &Error{
|
||||||
ImportPath: e.packagePath,
|
ImportPath: e.packagePath,
|
||||||
Pos: getPosition(inst),
|
Pos: pos,
|
||||||
Err: err,
|
Err: err,
|
||||||
|
Traceback: []ErrorLine{{pos, inst}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче