Skip to content

stat can result in unexpected runtime failures #27

Closed
@Thimoteus

Description

@Thimoteus

This is a failing example that's close to what I was using.

I'm not sure if the problem is with stat or catchException, but essentially this is the problem:

You can use catchException to discharge an EXCEPTION assumption from your program. Great! If we use enough catchExceptions, the compiler tells us (assuming everything was well-typed) that our program won't have any uncaught exceptions at runtime.

Except it does. catchException doesn't ... catch the exception ... when using stat on a path that doesn't exist.

This threw me for a loop since I was assuming that uncaught runtime exceptions wouldn't happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions