[
http://jira.codehaus.org/browse/MRELEASE-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208150#action_208150
]
Brett Porter commented on MRELEASE-515:
---------------------------------------
that's fine, but for the most part failures are distinct from errors. Failures
are meant to be "here's what the user did wrong and how to fix it", errors are
"something went wrong that we didn't anticipate and here's the trace". Is the
release failure exception appropriate in the first place?
> release:prepare eats the root cause of the exception
> ----------------------------------------------------
>
> Key: MRELEASE-515
> URL: http://jira.codehaus.org/browse/MRELEASE-515
> Project: Maven 2.x Release Plugin
> Issue Type: Bug
> Affects Versions: 2.0-beta-9
> Reporter: Kohsuke Kawaguchi
> Assignee: Olivier Lamy
> Fix For: 2.0
>
>
> The PrepareReleaseMojo.execute() method contains the following statement:
> {code:java}
> try
> {
> releaseManager.prepare( config, getReleaseEnvironment(), reactorProjects,
> resume, dryRun );
> }
> catch ( ReleaseExecutionException e )
> {
> throw new MojoExecutionException( e.getMessage(), e );
> }
> catch ( ReleaseFailureException e )
> {
> throw new MojoFailureException( e.getMessage() );
> }
> {code}
> As you can see, the stack trace and nested exception of the
> ReleaseFailureException is lost, which makes it unnecessarily hard to
> diagnose the root cause of problems like MRELEASE-332. The code should be
> modified to something like:
> {code}
> throw (MojoFailureException)new MojoFailureException( e.getMessage()
> ).initCause(e);
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira