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

Panics when opening a file that doesn't exists #10

Open
lukewilliamboswell opened this issue Dec 13, 2022 · 0 comments
Open

Panics when opening a file that doesn't exists #10

lukewilliamboswell opened this issue Dec 13, 2022 · 0 comments

Comments

@lukewilliamboswell
Copy link
Collaborator

app "example"
    packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.1.2/3bKbbmgtIfOyC6FviJ9o8F8xqKutmXgjCJx3bMfVTSo.tar.br" }
    imports [
        pf.Stdout,
        pf.Task.{ Task },
        pf.File,
        pf.Path.{ Path },
    ]
    provides [ main ] to pf

main : Task {} []
main =
    task = 
        _ <- File.readUtf8 (Path.fromStr "i-dont-exist.txt") |> Task.await
        
        Stdout.line ""

    Task.onFail task \_ -> crash "ooops"
luke@192-168-1-108 aoc-2022 % roc dev test.roc
thread '<unnamed>' panicked at 'not yet implemented: Report a file open error', src/lib.rs:421:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
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

No branches or pull requests

1 participant