From 5d7cf830d7cb41654ca17cf4b4232ec6fae91bb4 Mon Sep 17 00:00:00 2001 From: Jan Decaluwe Date: Wed, 27 Jun 2012 16:21:20 +0200 Subject: [PATCH] better error message for unexpected callable --HG-- branch : 0.8-dev --- myhdl/conversion/_analyze.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/myhdl/conversion/_analyze.py b/myhdl/conversion/_analyze.py index 5c6997ad..bb4dc244 100644 --- a/myhdl/conversion/_analyze.py +++ b/myhdl/conversion/_analyze.py @@ -655,7 +655,8 @@ class _AnalyzeVisitor(ast.NodeVisitor, _ConversionMixin): elif type(f) is MethodType: self.raiseError(node,_error.NotSupported, "method call: '%s'" % f.__name__) else: - raise AssertionError("Unexpected callable") + debug_info = [e for e in ast.iter_fields(node.func)] + raise AssertionError("Unexpected callable %s" % str(debug_info)) if argsAreInputs: for arg in node.args: self.visit(arg)