Commits

Anonymous committed ff7ce47

Showing the traceback of exceptions that happen in hooks

Comments (0)

Files changed (2)

ropemacs/__init__.py

 
     @lisphook
     def after_save_actions(self):
-        if self.project is not None:
+        raise Exception('sldjf')
+        if self.project is not None and self.old_content is not None:
             libutils.report_change(self.project, lisp.buffer_file_name(),
                                    self.old_content)
             self.old_content = None

ropemacs/lisputils.py

         try:
             func(*args, **kwds)
         except Exception, e:
-            message('Exception in ropemacs hook: %s' %
-                    (type(e).__name__ + str(e)))
+            trace = str(traceback.format_exc())
+            message('%s\nIgnored an exception in ropemacs hook: %s: %s' %
+                    (trace, type(e).__name__, str(e)))
     newfunc.interaction = ''
     return newfunc