Package com.perforce.p4java.exception

Provides exception and error classes for signaling and handling user, internal, and Perforce server errors.

See:
          Description

Class Summary
MessageGenericCode Defines known Perforce error message generic codes.
MessageSeverityCode Defines known Perforce error severity codes.
MessageSubsystemCode Defines known Perforce message error subsystem codes as returned from the P4Java message and exception system.
 

Enum Summary
TrustException.Type  
 

Exception Summary
AccessException Exception thrown by P4Java methods when access to data or services has been denied by the Perforce server.
ConfigException Exception class for P4Java configuration-related exceptions.
ConnectionException Superclass for all P4Java connection-related exceptions.
ConnectionNotConnectedException Special subclass of ConnectionException to signal the case of attempting to issue a Perforce server command with an IServer that hasn't been explicitly connected to that Perforce server.
FileDecoderException Exception class for P4Java file decoding exceptions.
FileEncoderException Exception class for P4Java file encoding exceptions.
NoSuchObjectException Exception class to use to signal missing objects within p4java; this is not used for missing objects on the Perforce server side.
OptionsException A P4Java extension used to signal to participating users that an error occurred in Options object processing.
P4JavaException Superclass for all P4Java-generated exceptions.
RequestException An exception to be used to signal that the Perforce server has detected an error in processing or fielding a request.
ResourceException Exception superclass for all P4Java resource-related exceptions.
TrustException Special subclass of ConnectionException to signal the case of attempting to establish trust for a SSL connection to the Perforce server.
 

Error Summary
ClientError Signals a serious and probably unrecoverable client error in an underlying transport layer.
NullPointerError Error class used to signal null pointers.
P4JavaError Class intended to be used to signal unrecoverable errors that a client or other package should probably not handle or that signal serious errors without known fixes.
ProtocolError Signals a serious and probably unrecoverable protocol error in an underlying transport layer.
UnimplementedError Error class used to signal an unimplemented feature or method.
 

Package com.perforce.p4java.exception Description

Provides exception and error classes for signaling and handling user, internal, and Perforce server errors.

P4Java uses a fairly standard set of extensions to java.lang.Exception to signal recoverable errors, but it also uses extensions to java.lang.Error to signal unrecoverable errors that it's detected itself (such as null pointers or out-of-range values). Since they're defined as extensions to Error, they're not typically declared in method "throws" clauses, which means users are free to ignore them in the same way that they can ignore non-P4Java Error throwables.

However, if you wish to keep control in the face of all possible errors, it's probably a good idea to keep an outer catch block for P4JError catching as well as other exceptions and throwables — P4Java does not throw such errors lightly, only for conditions that show a serious programming error (either internally or by the user).



Copyright © 2015 Perforce Software. All Rights Reserved.