Skip to content

Making FileNotFoundException open to allow subclassing it #459

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nathanfallet
Copy link

In some cases, we would like to subclass FileNotFoundException (the same way it subclasses IOException for example). But it was currently not possible since it was not open.

Example from kdriver:

class BrowserExecutableNotFoundException : FileNotFoundException(
    """
    Could not determine browser executable.
    Make sure your browser is installed in the default location (path).
    Or specify browserExecutablePath parameter.
    """.trimIndent()
)

This is okay on JVM, but does not work on other platforms yet (until this PR gets merged and released 😎)

@nathanfallet nathanfallet changed the title Making FileNotFoundException to allow subclassing it Making FileNotFoundException open to allow subclassing it Jul 4, 2025
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.

1 participant