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

be/jvm/interpreter: increase robustness of intrinsics on runtime exce… #2804

Conversation

michaellilltokiwa
Copy link
Member

before:

/home/not_synced/fuzion (2024-03-26T15-41-12+01-00)130$ cat ~/playground/test.fz
ex is
  say (net.client ex net.family.ipv4 net.protocol.tcp "i_dont_exist" 99)
/home/not_synced/fuzion (2024-03-26T15-41-12+01-00)$ fz ~/playground/test.fz 

error 1: java.nio.channels.UnresolvedAddressException
        at java.base/sun.nio.ch.Net.checkAddress(Net.java:137)
        at java.base/sun.nio.ch.Net.checkAddress(Net.java:145)
        at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:842)
        at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:865)
        at dev.flang.be.jvm.runtime.Intrinsics.fuzion_sys_net_connect0(Intrinsics.java:397)
        at fzC_fuzion__sys__net__5connect.fzRoutine($MODULE/fuzion/sys/net.fz)
        at fzC_net__4client_ex.fzRoutine($MODULE/net/client.fz)
        at fzC_ex.fzRoutine(/home/sam/playground/test.fz)
        at fzC_universe.fz_run(--builtin--)
        at dev.flang.be.jvm.runtime.FuzionThread.lambda$new$1(FuzionThread.java:97)
        at dev.flang.util.Errors.runAndExit(Errors.java:935)
        at dev.flang.be.jvm.runtime.FuzionThread.lambda$new$2(FuzionThread.java:106)
        at java.base/java.lang.Thread.run(Thread.java:1583)


*** fatal errors encountered, stopping.

now:

/home/not_synced/fuzion (be/jvm/interpreter--increase-robustness-of-intrinsics-on-runtime-exceptions)$ cat ~/playground/test.fz
ex is
  say (net.client ex net.family.ipv4 net.protocol.tcp "i_dont_exist" 99)
/home/not_synced/fuzion (be/jvm/interpreter--increase-robustness-of-intrinsics-on-runtime-exceptions)$ fz ~/playground/test.fz 
--error: error: 0--

@maxteufel maxteufel merged commit 0927ba2 into tokiwa-software:main Mar 27, 2024
4 checks passed
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