maven-native-api: AbstractCompiler#getObjectFile() produces meaningless error 
messages
--------------------------------------------------------------------------------------

                 Key: MOJO-1730
                 URL: https://jira.codehaus.org/browse/MOJO-1730
             Project: Mojo
          Issue Type: Improvement
          Components: native
            Reporter: Hendrik Schreiber
            Priority: Minor


When something goes wrong in AbstractCompiler#getObjectFile(), only the 
exception's message of the offending IOException is provided in the 
encapsulating NativeBuildException like this:

   throw new NativeBuildException( e.getMessage() );

This leads to rather meaningless error messages like:

Caused by: org.codehaus.mojo.natives.NativeBuildException: Invalid argument
        at 
org.codehaus.mojo.natives.compiler.AbstractCompiler.getObjectFile(AbstractCompiler.java:189)
        at 
org.codehaus.mojo.natives.compiler.AbstractCompiler.compile(AbstractCompiler.java:76)
[...]

It would help the very lost user, if the code was something like this:

   throw new NativeBuildException( "Failed to figure out objectfilename for " + 
sourceFile + ": " + e.getMessage() , e );

That way the user would know, an IOException is the problem, and got some 
additional clues...


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to