Bug 226374 - [api] Need some default children of SystemMessageException for cancellation, network error and security error
Summary: [api] Need some default children of SystemMessageException for cancellation, ...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api, PII
Depends on: 226301
Blocks: 285992 199854 233993
  Show dependency tree
 
Reported: 2008-04-09 17:39 EDT by Martin Oberhuber CLA
Modified: 2009-08-07 09:09 EDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-04-09 17:39:16 EDT
+++ This bug was initially created as a clone of Bug #226301 +++

Just like with the RemoteFileException class hierarchy, we need more generic children of SystemMessageException for cancellation, network I/O error and security error.

I propose generalizing RemoteFileException by adding another base class above it, in org.eclipse.rse.services. That base class should deal with nested root exceptions just like RemoteFileException now. One possible name could be
    SystemRemoteMessageException

Then we also need exceptions with concrete well-known messages:
    SystemRemoteCanceledException
    SystemRemoteSecurityException
    SystemRemoteIOException
all declared in rse.services, for general usage in IShellService and others.
handle it.
Comment 1 Martin Oberhuber CLA 2008-04-09 17:40:00 EDT
Tentatively assigning M6 since this is a simple enhancement but I'm not sure if I can make it.
Comment 2 Martin Oberhuber CLA 2008-05-05 19:35:13 EDT
As per bug 221211 comment 31, we'll need a new kind of SystemMessageException also for the case where a timeout occurs trying to acquire a remote channel or a lock on remote resources.
Comment 3 David McKnight CLA 2008-05-06 09:33:29 EDT
I'm not sure if I'll get a chance to look at this this week since I'm pretty busy with other stuff.  You may want to assign this to someone else if you need it right away.
Comment 4 Martin Oberhuber CLA 2008-05-06 18:50:04 EDT
API Added in org.eclipse.rse.services/clientserver:
[226374] [api] Need default SystemMessageException specialisations


New API Classes in clientserver.messages:
-----------------------------------------
SystemOperationCancelledException
SystemUnsupportedOperationException
SystemRemoteMessageException
  SystemNetworkIOException
  SystemOperationFailedException
  SystemRemoteSecurityException


Deprecated API Classes in rse.services.files:
---------------------------------------------
RemoteFileCancelledException -- Use SystemOperationCancelledException
RemoteFileSecurityException -- Use SystemRemoteSecurityException


Other API Changes:
------------------
RemoteFileException now extends SystemRemoteMessageException
RemoteFileCancelledException now extends SystemOperationCancelledException


New PII Strings Added (CommonMessages.properties):
--------------------------------------------------
MSG_COMM_NETWORK_ERROR=Operation failed due to network I/O error ''{0}''
MSG_OPERATION_UNSUPPORTED = Operation not supported: ''{0}''
MSG_OPERATION_SECURITY_VIOLATION=Operation failed. Security violation on ''{0}''


New SystemMessageIDs added (ICommonMessageIds.java):
----------------------------------------------------
public static final String MSG_OPERATION_UNSUPPORTED = "RSEG9999";
public static final String MSG_OPERATION_SECURITY_VIOLATION = "RSEG9999";
public static final String MSG_COMM_NETWORK_ERROR = "RSEC9999";


The new message ID's need to be reviewed, properly assigned, and added to the relevant places e.g. systemmessages.xml, uiMessagesCore.html and probably ISystemMessages.java
Comment 5 Martin Oberhuber CLA 2008-05-06 20:22:44 EDT
Also added SystemUnexpectedErrorException
Comment 6 Martin Oberhuber CLA 2008-05-06 20:41:21 EDT
Also added new API:
-------------------
SystemLockTimeoutException

Along with new PII:
-------------------
MSG_LOCK_TIMEOUT=A timeout occurred while trying to acquire a shared resource.

As well as new Message ID (To be reviewed):
-------------------------------------------
public static final String MSG_LOCK_TIMEOUT = "RSEG9999";
Comment 7 Martin Oberhuber CLA 2008-05-07 11:33:46 EDT
Added SystemElementNotFoundException

Added PII:
MSG_ELEMENT_NOT_FOUND = Missing element for {0}: \''{1}\''

Added ICommonMessageId:
String MSG_ELEMENT_NOT_FOUND = "RSEG9999";//FIXME //$NON-NLS-1$