Skip to content

Descriptive error messages for julia exceptions #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 30, 2014

Conversation

eslgastal
Copy link
Contributor

This patch brings more descriptive error messages when julia code throws an exception. Example output in IPython notebook:

IPython notebook julia error example image

b = IOBuffer()
showerror(b, e, catch_backtrace())
seekstart(b)
return readall(b)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be simpler to just do sprint(showerror, e, catch_backtrace())

@jakebolewski
Copy link
Contributor

Hmm this segfaults for me (a is undefined). The old version worked in this example.

In [5]: jenv.eval("1 / a")

signal (11): Segmentation fault: 11
jl_bytestring_ptr at /private/tmp/julia-krtFXw/src/jlapi.c:147
ffi_call_unix64 at /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
ffi_call at /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
_ctypes_callproc at /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
PyCFuncPtr_call at /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
PyObject_Call at /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/Python (unknown line)
...

@jakebolewski
Copy link
Contributor

@egastal I fixed the problem I was having. These error messages are much better, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants