Skip to content

More specific exception#155

Open
owenRiddy wants to merge 2 commits intocgrand:masterfrom
owenRiddy:more-specific-exception
Open

More specific exception#155
owenRiddy wants to merge 2 commits intocgrand:masterfrom
owenRiddy:more-specific-exception

Conversation

@owenRiddy
Copy link
Copy Markdown

The Quickstart proved misleading (#154) and didn't adequately signal that the word resource meant a Java resource. It looks a lot like a file path.

This PR improves the exception thrown from NullPointerException to MissingResourceException and adds a hint to the error message with more context.

it assumes that people are more likely to run into this failure mode when they follow the Quickstart int he README.

Owen Riddy added 2 commits January 17, 2022 23:38
If someone attempts to follow the Quickstart guide without realising
that the HTML needs to be available as a resource the exception
thrown (NullPointerException) is misleading. It should be a
MissingResourceException.
tomoharu-fujita added a commit to Connecty/enlive that referenced this pull request Jan 28, 2026
Major changes:
- Fix all reflection warnings for modern JVM compatibility (cgrand#158, PR cgrand#152)
- Update jsoup from 1.7.2 to 1.18.3
- Add missing HTML5 void elements: col, embed, keygen, param, source, track, wbr (cgrand#140)
- JSoup parser now supports Reader input (enables html-snippet) (cgrand#90)
- Improve error message for missing resources with MissingResourceException (cgrand#154, PR cgrand#155)
- Migrate from Leiningen to tools.deps (deps.edn)
- Replace Travis CI with GitHub Actions (Java 11/17/21 matrix)
- Remove obsolete build.xml (Ant)

See CHANGELOG.md for full details.
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