maven-help-plugin icon indicating copy to clipboard operation
maven-help-plugin copied to clipboard

[MPH-218] Embed original exceptions as cause in DescribeMojo

Open jira-importer opened this issue 1 year ago • 0 comments

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

jira-importer avatar Dec 07 '24 11:12 jira-importer