-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Hi,
the with
macro fails when an exception is thrown in its body and the __exit__
magic method is hit:
TypeError: 'traceback' object is not callable
- To reproduce, open up a REPL.
- Manage a socket connection with and throw anything, it throws an exception about traceback rather than the actual exception
basilisp.user=> (with [sock (socket/socket socket/AF_INET socket/SOCK_STREAM)]
(throw (python/ValueError)))
Traceback (most recent call last):
File "<REPL Input>", line 1, in <module>
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\src\basilisp\src\basilisp\cli.py", line 306, in repl
result = eval_str(lsrc, ctx, ns, eof)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\basilisp\src\basilisp\cli.py", line 52, in eval_str
last = compiler.compile_and_exec_form(form, ctx, ns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\basilisp\src\basilisp\lang\compiler\__init__.py", line 163, in compile_and_exec_form
exec(bytecode, ns.module.__dict__)
File "<REPL Input>", line 2, in <module>
TypeError: 'traceback' object is not callable
basilisp.user=>
PR to follow.
Metadata
Metadata
Assignees
Labels
No labels