Permalink
Browse files

include error in 'Unexpected error' message.

  • Loading branch information...
1 parent 44c21de commit 04e15aa0f68dff7b853a055f9b7a92fa51829966 @minrk committed Dec 13, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 IPython/frontend/html/notebook/notebookmanager.py
@@ -206,16 +206,16 @@ def save_notebook_object(self, notebook_id, nb):
try:
with open(path,'w') as f:
current.write(nb, f, u'json')
- except:
- raise web.HTTPError(400, u'Unexpected error while saving notebook')
+ except Exception as e:
+ raise web.HTTPError(400, u'Unexpected error while saving notebook: %s' % e)
# save .py script as well
if self.save_script:
pypath = os.path.splitext(path)[0] + '.py'
try:
with open(pypath,'w') as f:
current.write(nb, f, u'py')
- except:
- raise web.HTTPError(400, u'Unexpected error while saving notebook as script')
+ except Exception as e:
+ raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s' % e)
if old_name != new_name:
old_path = self.get_path_by_name(old_name)

0 comments on commit 04e15aa

Please sign in to comment.