Skip to content
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

Unwrap the InvocationTargetException improving the error message #66

Merged
merged 1 commit into from Dec 20, 2016

Conversation

lukecwik
Copy link
Contributor

@lukecwik lukecwik commented Oct 19, 2016

Unwrap the InvocationTargetException improving the error message which users get when their application fails.

This removes the boilerplate found in the plugin output which preceeds the users stacktrace:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
        at java.lang.Thread.run(Thread.java:745)
... <Users Stack Trace> ...

making it just contain the stack trace from the users application.

This also removes null: InvocationTargetException: from the plugin output summary:

An exception occured while executing the Java class. null: InvocationTargetException: <Message from users exception>

thus making it:

An exception occured while executing the Java class. <Message from users exception>

…h users get

when their application fails.

This removes the boilerplate found in the plugin output which preceeds the users stacktrace:
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
        at java.lang.Thread.run(Thread.java:745)

This also removes "null: InvocationTargetException:" from the plugin output summary
thus making it:
An exception occured while executing the Java class. <Message from users exception>
@olamy olamy merged commit f717d71 into mojohaus:master Dec 20, 2016
@rfscholte rfscholte added this to the 1.6.0 milestone Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants