修复: byte/rune 长度混淆及错误位置丢失
This commit is contained in:
@@ -81,5 +81,12 @@ func wrapExecError(err error) error {
|
||||
if errors.As(err, &unsafeErr) {
|
||||
return err
|
||||
}
|
||||
var posErr *internal.PosError
|
||||
if errors.As(err, &posErr) {
|
||||
return &ExecError{
|
||||
Pos: Position{Line: posErr.Line, Column: posErr.Col},
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
return &ExecError{Message: err.Error()}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user