Improved error reporting
This commit is contained in:
parent
2c886823e7
commit
a15ddf4013
1 changed files with 1 additions and 1 deletions
|
|
@ -736,7 +736,7 @@ proc semRaise(c: PContext, n: PNode): PNode =
|
||||||
if base.sym.name.s == "Exception":
|
if base.sym.name.s == "Exception":
|
||||||
break
|
break
|
||||||
if base.lastSon == nil:
|
if base.lastSon == nil:
|
||||||
localError(n.info, errExprIsNoException)
|
localError(n.info, "raised object of type $1 does not inherit from Exception", [typ.sym.name.s])
|
||||||
return
|
return
|
||||||
base = base.lastSon
|
base = base.lastSon
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue