diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index d804beff56..a44b2fafc4 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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