Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when you need to apply Java exception handling best practices — including using specific exception types, managing resources with try-with-resources, securing exception messages, preserving error context via exception chaining, validating inputs early with fail-fast principles, handling thread interruption correctly, documenting exceptions with @throws, enforcing logging policy, translating exceptions at API boundaries, managing retries and idempotency, enforcing timeouts, attaching suppress
.claude/skills/jabrena-126-java-exception-handling/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-19 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-04 | ✓→✗ | ▼ Worse | -56% | 0% |
| case-05 | ✓→✗ | ▼ Worse | -48% | 0% |
| case-07 | ✓→✗ | ▼ Worse | -54% | 0% |
| case-08 | ✓→✗ | ▼ Worse | -34% | 0% |
Identify and apply robust Java exception handling practices to improve error clarity, security, debuggability, and system reliability.
What is covered in this Skill?
Exception/RuntimeExceptionIllegalArgumentException/NullPointerExceptionInterruptedException handling with interrupted-status restoration@throws JavaDoc documentation, fail-fast principleThrowable#addSuppressed for secondary cleanup failuresThrowable/ErrorCompletionStage codeScope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Before applying any exception handling changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
./mvnw compile or mvn compile before applying any changes./mvnw clean verify or mvn clean verify after applying improvementsRun ./mvnw compile or mvn compile and stop immediately if compilation fails.
Read references/126-java-exception-handling.md and identify applicable failure-handling and observability improvements.
Refactor to specific exceptions, safe resource handling, error translation, and consistent logging patterns.
Run ./mvnw clean verify or mvn clean verify after applying improvements.
For detailed guidance, examples, and constraints, see references/126-java-exception-handling.md.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 4,047 | 5,228 | +29% | 1 | 1 | 0% | 140 | 855 | +511% | 0 | 0 | — |
case-02 | fail→fail | 25,159 | 5,680 | -77% | 1 | 1 | 0% | 4,024 | 887 | -78% | 0 | 0 | — |
case-03 | fail→fail | 3,930 | 5,134 | +31% | 1 | 1 | 0% | 194 | 815 | +320% | 0 | 0 | — |
case-04 | pass→fail | 10,920 | 5,066 | -54% | 1 | 1 | 0% | 1,773 | 772 | -56% | 0 | 0 | — |
case-05 | pass→fail | 10,094 | 5,877 | -42% | 1 | 1 | 0% | 1,672 | 864 | -48% | 0 | 0 | — |
case-06 | pass→pass | 14,701 | 11,561 | -21% | 1 | 1 | 0% | 2,148 | 2,324 | +8% | 0 | 0 | — |
case-07 | pass→fail | 10,128 | 5,317 | -48% | 1 | 1 | 0% | 1,622 | 752 | -54% | 0 | 0 | — |
case-08 | pass→fail | 8,385 | 5,904 | -30% | 1 | 1 | 0% | 1,318 | 867 | -34% | 0 | 0 | — |
case-09 | pass→pass | 10,952 | 9,419 | -14% | 1 | 1 | 0% | 1,785 | 2,109 | +18% | 0 | 0 | — |
case-10 | pass→pass | 14,480 | 8,594 | -41% | 1 | 1 | 0% | 2,117 | 1,835 | -13% | 0 | 0 | — |
case-11 | pass→pass | 13,741 | 7,402 | -46% | 1 | 1 | 0% | 2,118 | 1,598 | -25% | 0 | 0 | — |
case-12 | pass→pass | 18,163 | 13,687 | -25% | 1 | 1 | 0% | 2,939 | 2,751 | -6% | 0 | 0 | — |
case-13 | pass→pass | 16,340 | 6,940 | -58% | 1 | 1 | 0% | 2,683 | 1,660 | -38% | 0 | 0 | — |
case-14 | pass→pass | 13,826 | 12,189 | -12% | 1 | 1 | 0% | 2,268 | 2,707 | +19% | 0 | 0 | — |
case-15 | pass→fail | 10,812 | 2,747 | -75% | 1 | 1 | 0% | 1,748 | 831 | -52% | 0 | 0 | — |
case-16 | pass→pass | 15,777 | 12,755 | -19% | 1 | 1 | 0% | 2,393 | 2,879 | +20% | 0 | 0 | — |
case-17 | pass→pass | 18,327 | 14,467 | -21% | 1 | 1 | 0% | 2,578 | 2,938 | +14% | 0 | 0 | — |
case-18 | pass→pass | 8,003 | 3,497 | -56% | 1 | 1 | 0% | 1,203 | 1,133 | -6% | 0 | 0 | — |
case-19 | fail→pass | 8,834 | 2,693 | -70% | 1 | 1 | 0% | 1,235 | 950 | -23% | 0 | 0 | — |
case-20 | pass→pass | 13,670 | 13,227 | -3% | 1 | 1 | 0% | 2,138 | 2,645 | +24% | 0 | 0 | — |
case-21 | pass→pass | 10,619 | 7,004 | -34% | 1 | 1 | 0% | 1,801 | 1,868 | +4% | 0 | 0 | — |
case-22 | pass→pass | 14,417 | 11,175 | -22% | 1 | 1 | 0% | 2,582 | 2,560 | -1% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 16 counted toward the lift figure. The other 6 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -100 percentage points is the difference between those two pass rates over the 16 comparable cases. 5 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.