From bd31b46f6ca175c90c7e5f4c7795ffd8c72fabc5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 6 Jun 2011 19:38:22 +0100 Subject: [PATCH] Warn instead of aborting for missing entry-points. --- dispatch.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dispatch.py b/dispatch.py index 666f94a..701e820 100644 --- a/dispatch.py +++ b/dispatch.py @@ -109,15 +109,16 @@ class Dispatcher: print ' }' def fail_function(self, function): - print r' OS::DebugMessage("error: unavailable function \"%s\"\n", __name);' - if function.fail is not None: + if function.type is stdapi.Void or function.fail is not None: + print r' OS::DebugMessage("warning: ignoring call to unavailable function %s\n", __name);' if function.type is stdapi.Void: - assert function.fail == '' + assert function.fail is None print ' return;' else: - assert function.fail != '' + assert function.fail is not None print ' return %s;' % function.fail else: - print ' OS::Abort();' + print r' OS::DebugMessage("error: unavailable function %s\n", __name);' + print r' OS::Abort();' -- 2.45.2