[jira] Created: (MNGECLIPSE-391) Show stack traces somewhere

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Created: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
Show stack traces somewhere
---------------------------

                 Key: MNGECLIPSE-391
                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
             Project: Maven Integration for Eclipse
          Issue Type: Improvement
          Components: Maven Launcher
    Affects Versions: 0.0.12
            Reporter: Aaron Digulla


When Maven throws an exception, there is no way to see it in the current plugin.

Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Updated: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Kuleshov updated MNGECLIPSE-391:
---------------------------------------

           Description:
When Maven throws an exception, there is no way to see it in the current plugin.
Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

  was:
When Maven throws an exception, there is no way to see it in the current plugin.

Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

    Remaining Estimate: 0 minutes
     Original Estimate: 0 minutes

Please provide exact steps to reproduce this issue.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Commented: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107664 ]

Aaron Digulla commented on MNGECLIPSE-391:
------------------------------------------

Huh? Just add

{code}
throw new RuntimeException("You can't see me")
{code}

in MavenModelManager.java in line 378. The next line reads:

{code}
return mavenEmbedder.readProjectWithDependencies(request);
{code}

Plus in Maven2Console, add methods which accept a Throwable as a second argument and calls this code with it:

{code}
  private void logException(int level, Throwable exception) {
    StringWriter buffer = new StringWriter (1024);
    PrintWriter out = new PrintWriter (buffer);
    exception.printStackTrace(out);
    String[] lines = buffer.toString().split(System.getProperty("line.separator")); //$NON-NLS-1$
    for(int i = 0; i < lines.length; i++ ) {
      appendLine(level, lines[i]);
    }
  }
{code}

and call those instead of "log.message(msg+" "+t.getMessage())".

I just don't know where to find the information if debug mode is enabled or I'd sent you a patch (I've made this change and it took me about 15 minutes, so I'm not even sure that would save you any time).

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Commented: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107668 ]

Eugene Kuleshov commented on MNGECLIPSE-391:
--------------------------------------------

Aaron, there are number of places when Exception is caught and logged into the Eclipse log and it is unclear to me what path you are concerned about. That is why I asked about exact steps.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Issue Comment Edited: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107668 ]

Eugene Kuleshov edited comment on MNGECLIPSE-391 at 9/18/07 10:41 AM:
----------------------------------------------------------------------

Aaron, there are number of places when Exception is caught and logged into the Eclipse log and it is unclear to me what path you are concerned about. That is why I asked about exact steps. So, please start from the reproduceable test case and then we can figure out solution to that. :-)


 was:
Aaron, there are number of places when Exception is caught and logged into the Eclipse log and it is unclear to me what path you are concerned about. That is why I asked about exact steps.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Commented: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107709 ]

Aaron Digulla commented on MNGECLIPSE-391:
------------------------------------------

Well, start with all code that calls Maven2Console.logMessage() and Maven2Console.logError() because they don't support to log exceptions, so all code which calls them must swallow exceptions.

I'm a bit confused by the "maven->log" code, though. There seem to be more than two implementations. One is based on MessageConsole, the others implement MavenEmbedderLogger. If both implementations are used, you must follow all calls to MavenEmbedderLogger, too.

I've attached a patch to this case to give you an idea what you should change.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Updated: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Digulla updated MNGECLIPSE-391:
-------------------------------------

    Attachment: mngeclipse-391.patch

Pass exceptions to the logger.

All that's left is to wire the showing of the exception to the "debug" setting in the prefs but I'm not sure that's such a great idea. Most of the exceptions are not error messages but exceptions (ie. things that went utterly wrong), so always showing them and/or logging them in the Eclipse error log might be a better idea.

Legal notice: I hereby submit this code under the the Apache License, Version 2.0.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>         Attachments: mngeclipse-391.patch
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Updated: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Kuleshov updated MNGECLIPSE-391:
---------------------------------------


(In reply to comment #4)
> I've attached a patch to this case to give you an idea what you should change.

Would you mind to tell me on what circumstances (from the end user point of view) that code would be triggered? I am bit fuzzy to patch something I haven't seen with my eyes. :-)

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>         Attachments: mngeclipse-391.patch
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Commented: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107806 ]

Aaron Digulla commented on MNGECLIPSE-391:
------------------------------------------

It is triggered when Maven throws exceptions. Right now, they are simply swallowed. If you're lucky, you get the message string but many Maven error messages give little clue as to what might be wrong. For example, in my case, I saw this error:

19.09.07 17:26:01 CEST: Project build error For artifact {org.apache.maven.wagon:wagon-webdav:null:jar}: The version cannot be empty.

The stack trace allowed me to set breakpoints in org.apache.maven.artifact.DefaultArtifact.validateIdentity() which threw the exception and track the problem down.

Or to put it in another way, I often use "maven -X" to get an idea what a Maven error might mean. Unfortunately, this isn't possible with the plugin.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>         Attachments: mngeclipse-391.patch
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] Closed: (MNGECLIPSE-391) Show stack traces somewhere

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Kuleshov closed MNGECLIPSE-391.
--------------------------------------

    Resolution: Fixed

Debug option in Maven launch configuration should enable printing exceptions. Please reopen if there is something else is missing.

> Show stack traces somewhere
> ---------------------------
>
>                 Key: MNGECLIPSE-391
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-391
>             Project: Maven Integration for Eclipse
>          Issue Type: Improvement
>          Components: Maven Launcher
>    Affects Versions: 0.0.12
>            Reporter: Aaron Digulla
>         Attachments: mngeclipse-391.patch
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When Maven throws an exception, there is no way to see it in the current plugin.
> Please log exceptions to the error log and/or show them in the console when "Debug" is enabled.

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

       

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

    http://xircles.codehaus.org/manage_email


Loading...