Improved error reporting

This commit is contained in:
Veladus
2017-12-11 21:48:22 +01:00
parent 2c886823e7
commit a15ddf4013

View File

@@ -736,7 +736,7 @@ proc semRaise(c: PContext, n: PNode): PNode =
if base.sym.name.s == "Exception":
break
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
base = base.lastSon