Skip to content

Commit

Permalink
actually throw an exception from IMCCompiler.compile_file method. Thi…
Browse files Browse the repository at this point in the history
…s fixes behavior in the API and reclaims another test
  • Loading branch information
Whiteknight committed Feb 22, 2011
1 parent a74e161 commit 795f437
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pmc/imccompiler.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ pmclass IMCCompiler auto_attrs provides HLLCompiler provide invokable {

/* TODO: Handle outer_ctx */
pf = imcc_compile_file(attrs->imcc_info, filename, attrs->is_pasm);
if (PMC_IS_NULL(pf)) {
STRING * const msg = imcc_last_error_message(attrs->imcc_info);
INTVAL code = imcc_last_error_code(attrs->imcc_info);
Parrot_ex_throw_from_c_args(INTERP, NULL, code, "%Ss", msg);
}

Parrot_pop_context(interp);
Parrot_unblock_GC_mark(interp);
Expand Down

0 comments on commit 795f437

Please sign in to comment.