mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Adding guards against null message in Exception - bug #151663
This commit is contained in:
parent
c994a0e5aa
commit
e1b13bbf23
1 changed files with 4 additions and 2 deletions
|
@ -282,16 +282,18 @@ public class GDBCDIDebugger implements ICDIDebugger {
|
|||
String message = MIPlugin.getResourceString("src.GDBDebugger.Error_creating_session") + exception.getMessage();//$NON-NLS-1$
|
||||
int code = ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR;
|
||||
String ID = MIPlugin.getUniqueIdentifier();
|
||||
String exMessage = ((exception==null)||(exception.getLocalizedMessage()==null)) ? new String() : exception.getLocalizedMessage();
|
||||
MultiStatus status = new MultiStatus(ID, code, message, exception);
|
||||
status.add(new Status(IStatus.ERROR, ID, code, exception == null ? new String() : exception.getLocalizedMessage(), exception));
|
||||
status.add(new Status(IStatus.ERROR, ID, code, exMessage, exception));
|
||||
return new CoreException(status);
|
||||
}
|
||||
|
||||
protected CoreException newCoreException(String message, Throwable exception) {
|
||||
int code = ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR;
|
||||
String ID = MIPlugin.getUniqueIdentifier();
|
||||
String exMessage = ((exception==null)||(exception.getLocalizedMessage()==null)) ? new String() : exception.getLocalizedMessage();
|
||||
MultiStatus status = new MultiStatus(ID, code, message, exception);
|
||||
status.add(new Status(IStatus.ERROR, ID, code, exception == null ? new String() : exception.getLocalizedMessage(), exception));
|
||||
status.add(new Status(IStatus.ERROR, ID, code, exMessage, exception));
|
||||
return new CoreException(status);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue