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

Make it possible to configure exception to throw on null-check failure #60

Closed
denis-zhdanov opened this Issue Nov 19, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@denis-zhdanov
Owner

denis-zhdanov commented Nov 19, 2017

Right now we throw NullPointerException when a null-check fails.

However, other popular frameworks (e.g. Spring Boot) throw IllegalArgumentException.

The task is to allow to configure exceptions to throw.

Note: it should be done on a per-instrumentation type basis because it doesn't look like a good idea to throw IllegalArgumentException when a method marked by @NotNull returns null. IllegalStateException looks more suitable here.

@denis-zhdanov denis-zhdanov self-assigned this Nov 19, 2017

denis-zhdanov added a commit that referenced this issue Nov 19, 2017

@denis-zhdanov

This comment has been minimized.

Owner

denis-zhdanov commented Nov 19, 2017

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment