From acb4ca8e47206edd08f1ab09ab06b64ec95606c2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Dec 2015 17:16:27 +0100 Subject: [PATCH] vhdlpp: More descriptive error message for a missing function. --- vhdlpp/expression_emit.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vhdlpp/expression_emit.cc b/vhdlpp/expression_emit.cc index 8874da8e6..67104e13c 100644 --- a/vhdlpp/expression_emit.cc +++ b/vhdlpp/expression_emit.cc @@ -583,7 +583,10 @@ int ExpFunc::emit(ostream&out, Entity*ent, ScopeBase*scope) { int errors = 0; - ivl_assert(*this, def_); + if(!def_) { + cerr << get_fileline() << ": error: unknown function: " << name_ << endl; + return 1; + } // If this function has an elaborated definition, and if // that definition is in a package, then include the