Exception catching is broken in JIT mode
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 603
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 6
Description
```
try:
raise RuntimeError("exception is thrown")
except Exception as e:
print(f"caught exception {e=}")
```
```
codon run excepton_test.codon
RuntimeError: exception is thrown
Raised from:
.../exception_test.codon:2:2
Backtrace:
Aborted
```
However, if built first then it works:
```
codon build excepton_test.codon
./excepton_test.codon
caught exception e=exception is thrown
```
Contributor guide
Research direction
Start by reproducing the issue with `codon run excepton_test.codon`, then compare it with `codon build excepton_test.codon` followed by running the built executable. The issue identifies no source files or tests, so locate the JIT exception-handling entry point and relevant tests from there. Done means the JIT run catches the exception and prints the same message as the built executable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100