lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [4/4] git commit: refs/heads/cfc-pod - Add a check to CFCPerlPod_constructors_pod
Date Sat, 20 Jul 2013 16:06:03 GMT
Add a check to CFCPerlPod_constructors_pod


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/0d329362
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/0d329362
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/0d329362

Branch: refs/heads/cfc-pod
Commit: 0d329362cb9a6f4ef67d59be4ad7bbe835ed9844
Parents: f089ae8
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Jul 20 17:21:50 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Jul 20 18:05:22 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/src/CFCPerlPod.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/0d329362/clownfish/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlPod.c b/clownfish/compiler/src/CFCPerlPod.c
index 78c804f..a1040e2 100644
--- a/clownfish/compiler/src/CFCPerlPod.c
+++ b/clownfish/compiler/src/CFCPerlPod.c
@@ -210,6 +210,10 @@ CFCPerlPod_constructors_pod(CFCPerlPod *self, CFCClass *klass) {
         }
         else {
             CFCFunction *init_func = CFCClass_function(klass, slot.func);
+            if (!init_func) {
+                CFCUtil_die("Can't find function '%s' in class '%s'",
+                            slot.func, CFCClass_get_class_name(klass));
+            }
             char *sub_pod
                 = CFCPerlPod_gen_subroutine_pod(self, init_func, slot.alias, klass,
                                                 slot.sample, class_name, true);


Mime
View raw message