diff --git a/runtime.go b/runtime.go index 0139ef10..6dff451c 100644 --- a/runtime.go +++ b/runtime.go @@ -386,11 +386,13 @@ func (e *Exception) String() string { } func (e *Exception) Error() string { - if e == nil || e.val == nil { + if e == nil { return "" } var b bytes.Buffer - b.WriteString(e.val.String()) + if e.val != nil { + b.WriteString(e.val.String()) + } e.writeShortStack(&b) return b.String() }