mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-18 21:55:45 +02:00
[226374] [api] Need default SystemMessageException specialisations
This commit is contained in:
parent
5aa99be837
commit
0dd32cee98
1 changed files with 21 additions and 9 deletions
|
@ -48,11 +48,23 @@ public class RemoteFileIOException extends RemoteFileException {
|
|||
* @param remoteException the initial cause of this exception
|
||||
*/
|
||||
public RemoteFileIOException(Exception remoteException) {
|
||||
super(getMyMessage(remoteException), remoteException);
|
||||
super(getMyMessage(Activator.PLUGIN_ID, remoteException), remoteException);
|
||||
|
||||
}
|
||||
|
||||
private static SystemMessage getMyMessage(Exception remoteException) {
|
||||
/**
|
||||
* Constructor for RemoteFileIOException that also takes a pluginId
|
||||
*
|
||||
* @param pluginId a plugin ID
|
||||
* @param remoteException the initial cause of this exception
|
||||
* @since 3.0
|
||||
*/
|
||||
public RemoteFileIOException(String pluginId, Exception remoteException) {
|
||||
super(getMyMessage(pluginId, remoteException), remoteException);
|
||||
|
||||
}
|
||||
|
||||
private static SystemMessage getMyMessage(String pluginId, Exception remoteException) {
|
||||
|
||||
String secondLevel = remoteException.getMessage();
|
||||
if (secondLevel == null) {
|
||||
|
@ -62,7 +74,7 @@ public class RemoteFileIOException extends RemoteFileException {
|
|||
String msgTxt = RSEServicesMessages.FILEMSG_OPERATION_FAILED;
|
||||
String msgDetails = NLS.bind(RSEServicesMessages.FILEMSG_OPERATION_FAILED_DETAILS, secondLevel);
|
||||
|
||||
myMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
myMessage = new SimpleSystemMessage(pluginId,
|
||||
"RSEF1002", //$NON-NLS-1$
|
||||
IStatus.ERROR, msgTxt, msgDetails);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue