Skip to content

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

Open
@jira-importer

Description

@jira-importer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenancepriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions