[svn:mod_parrot] r314 - mod_parrot/trunk/src

[email protected] Sat, 19 Jan 2008 07:55:16 -0800 (PST)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Sat Jan 19 07:55:15 2008
New Revision: 314

Modified:
   mod_parrot/trunk/src/mod_parrot.c

Log:
check return value when calling hll handlers so errors are reported


Modified: mod_parrot/trunk/src/mod_parrot.c
==============================================================================
--- mod_parrot/trunk/src/mod_parrot.c	(original)
+++ mod_parrot/trunk/src/mod_parrot.c	Sat Jan 19 07:55:15 2008
@@ -148,11 +148,14 @@
     ctx_class = Parrot_oo_get_class(interp, namespace);
     ctx_pmc = VTABLE_instantiate(interp, ctx_class, PMCNULL);
 
-    if (!hll) hll = MODPARROT_DEFAULT_HLL;
-    modparrot_call_sub_IPS(interp, hll, hll_handler, ret, ctx_pmc, handler);
-
     Parrot_unregister_pmc(interp, namespace);
 
+    if (!hll) hll = MODPARROT_DEFAULT_HLL;
+    if (!modparrot_call_sub_IPS(interp, hll, hll_handler, ret, ctx_pmc,
+        handler)) {
+        return(0);
+    }
+
     return(1);
 }