From 435d8ff405a6c03820b5bb2674526456b440b763 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Sun, 2 Nov 2014 23:26:30 -0500 Subject: [PATCH] =?UTF-8?q?fix=20#6179=20(n=C3=A9e=20#8828,=20non-specific?= =?UTF-8?q?=20error=20line=20number)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/codegen.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 359438894951c..33c30b55b2248 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -3123,8 +3123,11 @@ static Value *emit_expr(jl_value_t *expr, jl_codectx_t *ctx, bool isboxed, jl_errorf("macro definition not allowed inside a local scope"); } else { - jl_errorf("unsupported or misplaced expression \"%s\" in function %s", - head->name, ctx->linfo->name->name); + std::ostringstream err; + err << "unsupported or misplaced expression '" << head->name + << "' in function '" << ctx->linfo->name->name << "'"; + emit_error(err.str(), ctx); + return V_null; } } }