maven-help-plugin
maven-help-plugin copied to clipboard
[MPH-218] Embed original exceptions as cause in DescribeMojo
Elliotte Rusty Harold opened MPH-218 and commented
{{ return output; } catch (SecurityException e) { throw new MojoFailureException("SecurityException: " + e.getMessage()); } catch (IllegalArgumentException e) { throw new MojoFailureException("IllegalArgumentException: " + e.getMessage()); } catch (NoSuchMethodException e) { throw new MojoFailureException("NoSuchMethodException: " + e.getMessage()); } catch (IllegalAccessException e) { throw new MojoFailureException("IllegalAccessException: " + e.getMessage()); } catch (InvocationTargetException e) { Throwable cause = e.getCause();
if (cause instanceof NegativeArraySizeException) {
throw new MojoFailureException("NegativeArraySizeException: " + cause.getMessage());
}
throw new MojoFailureException("InvocationTargetException: " + e.getMessage());
}}}
No further details from MPH-218