Skip to content
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

Handle rethrow #17

Merged
merged 2 commits into from Feb 12, 2019
Merged

Handle rethrow #17

merged 2 commits into from Feb 12, 2019

Conversation

timholy
Copy link
Member

@timholy timholy commented Feb 12, 2019

rethrow is only viable inside a catch, so we need to intercept it and convert it to an ordinary throw.

In my hands, this was perhaps the single biggest limitation of JuliaInterpreter. I frequently got

julia> @test ret == ErrorException("inner")
Test Failed at REPL[10]:1
  Expression: ret == ErrorException("inner")
   Evaluated: ErrorException("rethrow(exc) not allowed outside a catch block") == ErrorException("inner")
ERROR: There was an error during testing

I expect this to have a substantial positive impact on #13.

rethrow is only viable inside a `catch`, so we need to intercept it
and convert it to an ordinary `throw`.
Ideally atsign-interpret would throw stacktraces identical to those
from compiled code. Unfortunately at present the stacktrace points
to lines in the interpreter itself.
@codecov-io
Copy link

codecov-io commented Feb 12, 2019

Codecov Report

Merging #17 into master will increase coverage by 0.61%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   70.81%   71.42%   +0.61%     
==========================================
  Files           6        6              
  Lines        1124     1127       +3     
==========================================
+ Hits          796      805       +9     
+ Misses        328      322       -6
Impacted Files Coverage Δ
src/interpret.jl 71.22% <100%> (+1.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71f19fb...5d986fb. Read the comment docs.

@timholy timholy merged commit 3e5c4ab into master Feb 12, 2019
@timholy timholy deleted the teh/rethrow branch February 12, 2019 09:32
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.

None yet

2 participants