Skip to content
This repository
Browse code

Throw an exception from Parrot_api_get_compiler if the compiler canno…

…t be found. brrt++ for the suggestion.
  • Loading branch information...
commit e4b931d2aadecba7f03254309f36fbe4e4ab06b0 1 parent 5a208a7
Andrew Whitworth authored June 05, 2012

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  src/embed/api.c
3  src/embed/api.c
@@ -550,6 +550,9 @@ Parrot_api_get_compiler(Parrot_PMC interp_pmc, ARGIN(Parrot_String type),
550 550
     ASSERT_ARGS(Parrot_api_get_compiler)
551 551
     EMBED_API_CALLIN(interp_pmc, interp)
552 552
     *compiler = Parrot_interp_get_compiler(interp, type);
  553
+    if (PMC_IS_NULL(*compiler))
  554
+        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
  555
+            "Cannot find compiler '%Ss'", type);
553 556
     EMBED_API_CALLOUT(interp_pmc, interp);
554 557
 }
555 558
 

0 notes on commit e4b931d

Please sign in to comment.
Something went wrong with that request. Please try again.