google / google/error-prone

Exception instance being thrown should have been caught or constructed locally

Open
#469 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

Any exception instance being thrown should have been either constructed or caught in the current scope. If it came from anywhere else (passed in as argument, was stored in a field...) then the stack trace will be mystifying, and the simple remedy is to chain that exception into a new one so you get a new stack trace as well.

(If we research this I imagine we will probably find we need a few more special case exemptions.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.