You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/01/14 20:40:35 UTC
[lucy-commits] [03/20] git commit: Add a check to CFCPerlPod_constructors_pod
Add a check to CFCPerlPod_constructors_pod
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/a0eaa258
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/a0eaa258
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/a0eaa258
Branch: refs/heads/cfc-pod
Commit: a0eaa25831ad61532be947a933b004c8c52c0d43
Parents: bcfaee0
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 20 17:21:50 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Jul 20 18:05:22 2013 +0200
----------------------------------------------------------------------
compiler/src/CFCPerlPod.c | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a0eaa258/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c
index 78c804f..a1040e2 100644
--- a/compiler/src/CFCPerlPod.c
+++ b/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);