https://github.com/kohsuke/github-api/search?utf8=%E2%9C%93&q=%22new+Error%22&type=
In general, this seems to be a bad idea. See also comments in jenkinsci/ghprb-plugin#570. This PR for the GHPRB plugin is left with the dilemma of catching throwable because there's no other choice since this API throws java.lang.Error.
A quote from java.lang.Error javadoc:
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
Instead, consider throwing IllegalStateException.
https://github.com/kohsuke/github-api/search?utf8=%E2%9C%93&q=%22new+Error%22&type=
In general, this seems to be a bad idea. See also comments in jenkinsci/ghprb-plugin#570. This PR for the GHPRB plugin is left with the dilemma of catching throwable because there's no other choice since this API throws
java.lang.Error.A quote from
java.lang.Errorjavadoc:Instead, consider throwing
IllegalStateException.