Skip to content

Commit

Permalink
Improve error message for undef ccall return type
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Oct 2, 2015
1 parent 26b58c6 commit ceb3b9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,14 @@ static jl_cgval_t emit_ccall(jl_value_t **args, size_t nargs, jl_codectx_t *ctx)
static_rt = true;
}
}
if (jl_exception_in_transit && jl_typeis(jl_exception_in_transit,
jl_undefvarerror_type)) {
std::string msg = "ccall return type undefined: " +
std::string(((jl_sym_t*)args[2])->name );
emit_error(msg.c_str(), ctx);
JL_GC_POP();
return jl_cgval_t();
}
if (rt == NULL) {
emit_error("error interpreting ccall return type", ctx);
JL_GC_POP();
Expand Down

0 comments on commit ceb3b9d

Please sign in to comment.