[jbosstools-issues] [JBoss JIRA] (JBIDE-25098) Provide a status preserving the stacktrace in org.eclipse.core.runtime.CoreException

Aurélien Pupier (JIRA) issues at jboss.org
Mon Sep 25 11:11:00 EDT 2017


Aurélien Pupier created JBIDE-25098:
---------------------------------------

             Summary: Provide a status preserving the stacktrace in org.eclipse.core.runtime.CoreException
                 Key: JBIDE-25098
                 URL: https://issues.jboss.org/browse/JBIDE-25098
             Project: Tools (JBoss Tools)
          Issue Type: Enhancement
          Components: server
    Affects Versions: 4.5.0.Final
            Reporter: Aurélien Pupier


in org.jboss.tools.runtime.core.util.internal.DownloadRuntimeOperationUtility.downloadAndUnzip(String, String, String, boolean, String, String, TaskModel, IProgressMonitor)

a status is directly returned instead of following the guidelines explained in the javadoc for CoreException.getStatus to recreate a Status which will preserve the stacktrace

{noformat}

IStatus org.eclipse.core.runtime.CoreException.getStatus()


Returns the status object for this exception. 

IMPORTANT:
 The result must NOT be used for logging, error reporting, or as a method return value, since that code pattern hides the original stack trace. Instead, create a new Status with your plug-in ID and this CoreException, and use that new status for error reporting or as a method return value. For example, instead of: 
      yourPlugin.getLog().log(exception.getStatus());
   
Use:       IStatus result = new Status(exception.getStatus().getSeverity(), pluginId, message, exception);
      yourPlugin.getLog().log(result);
   

Returns:a status object
{noformat}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jbosstools-issues mailing list