From 1e9e844f866dba44ed630a19135df910d955b814 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Fri, 20 Nov 2009 17:30:10 -0700 Subject: [PATCH] make explain.py properly report errors --- plugins/explain.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/explain.py b/plugins/explain.py index 481cf12..ba24501 100755 --- a/plugins/explain.py +++ b/plugins/explain.py @@ -10,8 +10,6 @@ def explain(inp): inp = inp.encode('utf8', 'ignore') try: - result = explain_c_declaration(inp.rstrip()) - except e: - result = str(e) - - return result + return explain_c_declaration(inp.rstrip()) + except Exception, e: + return 'error: %s' % e