Exception API¶
Most of the exceptions raised by any of the other modules will be an instance of the exceptions described in this module.
-
class
tgdb.exception.
ExceptionType
(value)¶ The type of exception encountered.
-
exception
tgdb.exception.
TGAdminParseException
(reason, cause: Exception = None, position: int = 0, token: str = None)¶ Error with parsing the input to the administrative client terminal.
-
property
position
¶ The position that the error occurred in.
-
property
-
exception
tgdb.exception.
TGAuthenticationException
(reason, errorcode=None, cause=None)¶ Exception for when the server refuses to authenticate the user because of a bad password or username.
-
property
exceptionType
¶ Gets the type of the exception.
-
property
-
exception
tgdb.exception.
TGBadMagic
(reason, errorcode=None, cause=None)¶ This exception could occur if the server and client are not on the same version of the Protocol Data Unit or if the server or clients messages are corrupted.
-
property
exceptionType
¶ Gets the type of the exception.
-
property
-
exception
tgdb.exception.
TGBadVerb
(reason, errorcode=None, cause=None)¶ This could occur if the client or server send a wrong verb identifier over.
-
abstract property
exceptionType
¶ Gets the type of the exception.
-
abstract property
-
exception
tgdb.exception.
TGChannelDisconnectedException
(reason, errorcode=None, cause=None)¶ Occurs when the client loses connection with the server.
-
property
exceptionType
¶ Gets the type of the exception.
-
property
-
exception
tgdb.exception.
TGConnectionTimeoutException
(reason, errorcode=None, cause=None)¶ Occurs if the connection lasts too long.
If you are running into this exception frequently, you might want to wrap your code around a while loop with reinitializing the connection object.
-
property
exceptionType
¶ Gets the type of the exception.
-
property
-
exception
tgdb.exception.
TGException
(reason, errorcode=None, cause=None)¶ TIBCO Graph Database specific exceptions.
-
classmethod
buildException
(reason, errorcode=None, cause=None)¶ Client code should never initialize any exceptions directly.
-
property
cause
¶ Represents the cause of this exception, if there was one.
For example, this might occur if a KeyError gets raised when it should not, so the Python API handles that exception and tells the user what is the likely reason.
-
property
errorcode
¶ Gets the exception’s error code.
-
property
exceptionType
¶ Gets the type of the exception.
-
classmethod
-
exception
tgdb.exception.
TGImpExpException
(reason, errorcode=None, cause=None)¶ Occurs when an import/export related error occurs.
-
exception
tgdb.exception.
TGInvalidMessageLength
(reason, errorcode=None, cause=None)¶ Message received ended before the API expected.
-
property
exceptionType
¶ Gets the type of the exception.
-
property
-
exception
tgdb.exception.
TGProtocolNotSupported
(reason, errorcode=None, cause=None)¶ The server’s protocol is incompatible with this API’s protocol.
Might want to update either the server or this API.
-
property
exceptionType
¶ Gets the type of the exception.
-
property
-
exception
tgdb.exception.
TGSecurityException
(reason, errorcode=None, cause=None)¶ Occurs when a security related issue occurs.
Contact your IT or security team to get this worked out. If only working
-
exception
tgdb.exception.
TGTransactionAlreadyInProgressException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionException
(reason, errorcode=None, cause=None)¶ Baseclass for more detailed transaction-related exceptions.
Designed to catch specific instances of transaction failure. For example, if you want to upsert an entity, you can first try to insert it, which if it is already there, will cause a TGTransactionUniqueConstraintViolation, which you can catch with an except statement specifying that exception.
-
exception
tgdb.exception.
TGTransactionGeneralErrorException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionInBadStateException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionMalFormedException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionOptimisticLockFailedException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionResourceExceededException
(reason, errorcode=None, cause=None)¶
-
class
tgdb.exception.
TGTransactionResponse
(value)¶ More thorough transaction response than just error or success.
-
exception
tgdb.exception.
TGTransactionUniqueConstraintViolationException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionUniqueIndexKeyAttributeNullError
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTransactionVerificationErrorException
(reason, errorcode=None, cause=None)¶
-
exception
tgdb.exception.
TGTypeCoercionNotSupported
(fromtype, totype, isarray=False)¶ Attempted to convert from one type to one that is incompatible.
Think trying to convert a number type to a single character.
If running into this issue, please make sure that the types are compatible (i.e. explicitly convert to the type you want it to convert to).
-
exception
tgdb.exception.
TGTypeNotSupported
(reason, errorcode=None, cause=None)¶ That type is not supported yet.
-
exception
tgdb.exception.
TGVersionMismatchException
(reason, errorcode=None, cause=None)¶ The version between the server and client is out of sync.