Skip to content

Commit

Permalink
fix: Fix error handling issue (#597)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <cegao@tensorchord.ai>
  • Loading branch information
gaocegege committed Jul 12, 2022
1 parent fa041a8 commit b467279
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/envd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func handleErr(err error) {
}

rootCause := errors.Cause(err)
var evalErr starlark.EvalError
var syntaxErr syntax.Error
var evalErr *starlark.EvalError
var syntaxErr *syntax.Error
if ok := errors.As(err, &evalErr); ok {
fmt.Fprintln(os.Stderr, evalErr.Backtrace())
} else if ok := errors.As(err, &syntaxErr); ok {
Expand Down

0 comments on commit b467279

Please sign in to comment.