3.7. Exception Handling¶
3.7.1. Exceptions – radical.saga.exceptions¶
- exception radical.saga.exceptions.AlreadyExists(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,ValueErrorThe entity to be created already exists. (rank: 8)
- exception radical.saga.exceptions.AuthenticationFailed(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,RuntimeErrorThe backend could not establish a valid identity. (rank: 3)
- exception radical.saga.exceptions.AuthorizationFailed(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,RuntimeErrorThe backend could not establish a valid identity. (rank: 4)
- exception radical.saga.exceptions.BadParameter(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,ValueErrorA given parameter is out of bound or ill formatted. (rank: 9)
- exception radical.saga.exceptions.DoesNotExist(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,KeyErrorAn operation tried to access a non-existing entity. (rank: 7)
- exception radical.saga.exceptions.IncorrectState(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,RuntimeErrorThe operation is not allowed on the entity in its current state. (rank: 6)
- exception radical.saga.exceptions.IncorrectURL(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,ValueErrorThe given URL could not be interpreted, for example due to an incorrect / unknown schema. (rank: 10)
- exception radical.saga.exceptions.NoSuccess(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,RuntimeErrorSome other error occurred. (rank: 1)
- exception radical.saga.exceptions.NotImplemented(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,NotImplementedErrorradical.saga does not implement this method or class. (rank: 11)
- exception radical.saga.exceptions.PermissionDenied(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,RuntimeErrorThe used identity is not permitted to perform the requested operation. (rank: 5)
- exception radical.saga.exceptions.SagaException(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
ExceptionThe Exception class encapsulates information about error conditions encountered in SAGA.
Additionally to the error message (e.message), the exception also provides a trace to the code location where the error condition got raised (e.traceback).
B{Example}:
try : file = saga.filesystem.File ("sftp://comet.xsede.org/tmp/data1.dat") except saga.Timeout as to : # maybe the network is down? print("connection timed out") except saga.Exception as e : # something else went wrong print("Exception occurred: %s %s" % (e, e.traceback))
There are cases where multiple backends can report errors at the same time. In that case, the radical.saga implementation will collect the exceptions, sort them by their ‘rank’, and return the highest ranked one. All other catched exceptions are available via
get_all_exceptions(), or via the exceptions property.The rank of an exception defines its explicity: in general terms: the higher the rank, the better defined / known is the cause of the problem.
- get_message()[source]¶
Return the exception message as a string. That message is also available via the ‘message’ property.
- get_object()[source]¶
Return the object that raised this exception. An object may not always be available – for example, exceptions raised during object creation may not have the option to keep an incomplete object instance around. In those cases, this method will return ‘None’. Either way, the object is also accessible via the ‘object’ property.
- property message¶
Return the exception message as a string. That message is also available via the ‘message’ property.
- property object¶
Return the object that raised this exception. An object may not always be available – for example, exceptions raised during object creation may not have the option to keep an incomplete object instance around. In those cases, this method will return ‘None’. Either way, the object is also accessible via the ‘object’ property.
- property type¶
Return the type of the exception as string.
- exception radical.saga.exceptions.Timeout(msg, parent=None, api_object=None, from_log=False)[source]¶
Bases:
SagaException,RuntimeErrorThe interaction with the backend times out. (rank: 2)