maven-exec-plugin: Improve Exception Message PR

23 views
Skip to first unread message

Lukasz Cwik

unread,
Nov 9, 2016, 11:14:39 PM11/9/16
to mojohaus-dev

I created the following PR (https://github.com/mojohaus/exec-maven-plugin/pull/66) to unwrap the InvocationTargetException improving the error message which users get when their application fails. The PR had been sitting around for a couple of weeks and was wondering how to get traction to get it accepted and merged?

This PR 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>

Lukasz Cwik

unread,
Dec 20, 2016, 4:17:32 PM12/20/16
to mojohaus-dev
Ping?

Olivier Lamy

unread,
Dec 20, 2016, 6:24:37 PM12/20/16
to mojoha...@googlegroups.com
Hi
Sorry for delay.
PR merged!

--
You received this message because you are subscribed to the Google Groups "mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojohaus-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mojoha...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mojohaus-dev/7d6b8a13-6115-42bd-93c3-5f0249c82ba8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Reply all
Reply to author
Forward
0 new messages