icat.exception — Exception handling
This module defines Python counterparts of the exceptions raised by ICAT or IDS server, as well as exceptions raised in python-icat.
Helper
- exception icat.exception._BaseException(*args)
Bases:
ExceptionAn exception that tries to suppress misleading context.
Exception Chaining and Embedded Tracebacks has been introduced with Python 3. Unfortunately the result is completely misleading most of the times. This class tries to strip the context from the exception traceback.
This is the common base class for for all exceptions defined in
icat.exception, it is not intented to be raised directly.
Exceptions raised by the ICAT or IDS server
- exception icat.exception.ServerError(error, status=None)
Bases:
_BaseExceptionErrors raised by either the ICAT or the IDS server.
This is the common base class for
icat.exception.ICATErrorandicat.exception.IDSError, it is not intented to be raised directly.
- exception icat.exception.ICATError(error, status=None)
Bases:
ServerErrorBase class for the errors raised by the ICAT server.
- exception icat.exception.ICATParameterError(error, status=None)
Bases:
ICATErrorGenerally indicates a problem with the arguments made to a call.
- exception icat.exception.ICATInternalError(error, status=None)
Bases:
ICATErrorMay be caused by network problems, database problems, GlassFish problems or bugs in ICAT.
- exception icat.exception.ICATPrivilegesError(error, status=None)
Bases:
ICATErrorIndicates that the authorization rules have not matched your request.
- exception icat.exception.ICATNoObjectError(error, status=None)
Bases:
ICATErrorIs thrown when something is not found.
- exception icat.exception.ICATObjectExistsError(error, status=None)
Bases:
ICATErrorIs thrown when trying to create something but there is already one with the same values of the constraint fields.
- exception icat.exception.ICATSessionError(error, status=None)
Bases:
ICATErrorIs used when the sessionId you have passed into a call is not valid or if you are unable to authenticate.
- exception icat.exception.ICATValidationError(error, status=None)
Bases:
ICATErrorMarks an exception which was thrown instead of placing the database in an invalid state.
- exception icat.exception.IDSError(error, status=None)
Bases:
ServerErrorBase class for the errors raised by the IDS server.
- exception icat.exception.IDSBadRequestError(error, status=None)
Bases:
IDSErrorAny kind of bad input parameter.
- exception icat.exception.IDSDataNotOnlineError(error, status=None)
Bases:
IDSErrorThe requested data are not on line.
- exception icat.exception.IDSInsufficientPrivilegesError(error, status=None)
Bases:
IDSErrorYou are denied access to the data.
- exception icat.exception.IDSInsufficientStorageError(error, status=None)
Bases:
IDSErrorThere is not sufficient physical storage or you have exceeded some quota.
- exception icat.exception.IDSInternalError(error, status=None)
Bases:
IDSErrorSome kind of failure in the server or in communicating with the server.
- exception icat.exception.IDSNotFoundError(error, status=None)
Bases:
IDSErrorThe requested data do not exist.
- exception icat.exception.IDSNotImplementedError(error, status=None)
Bases:
IDSErrorUse of some functionality that is not supported by the implementation.
- icat.exception.translateError(error, status=None, server='ICAT')
Translate an error from ICAT or IDS to the corresponding exception.
Exceptions raised by python-icat
- exception icat.exception.InternalError(*args)
Bases:
_BaseExceptionAn error that reveals a bug in python-icat.
- exception icat.exception.ConfigError(*args)
Bases:
_BaseExceptionError getting configuration options.
- exception icat.exception.QueryWarning
Bases:
WarningWarning while building a query.
Added in version 0.19.0.
- exception icat.exception.QueryNullableOrderWarning(attr)
Bases:
QueryWarningWarn about using a nullable many to one relation for ordering.
Changed in version 0.19.0: inherit from
QueryWarning.
- exception icat.exception.QueryOneToManyOrderWarning(attr)
Bases:
QueryWarningWarn about using a one to many relation for ordering.
Added in version 0.19.0.
- exception icat.exception.ClientVersionWarning(version=None, comment=None)
Bases:
WarningWarn that the version of the ICAT server is not supported by the client.
- exception icat.exception.ICATDeprecationWarning(feature, version=None)
Bases:
DeprecationWarningWarn about using an API feature that may get removed in future ICAT server versions.
- exception icat.exception.EntityTypeError(*args)
Bases:
_BaseException,TypeErrorAn invalid entity type has been used.
Changed in version 0.18.0: inherit from
TypeError.
- exception icat.exception.VersionMethodError(method, version=None, service='ICAT')
Bases:
_BaseExceptionCall of an API method that is not supported in the version of the server.
- exception icat.exception.SearchResultError(*args)
Bases:
_BaseExceptionA search result does not conform to what should have been expected.
- exception icat.exception.SearchAssertionError(query, assertmin, assertmax, num)
Bases:
SearchResultErrorA search result does not conform to an assertion.
This exception is thrown when the number of objects found on a search does not lie within the bounds of an assertion, see
icat.client.Client.assertedSearch().
- exception icat.exception.DataConsistencyError(*args)
Bases:
_BaseExceptionSome data is not consistent with rules or constraints.
- exception icat.exception.IDSResponseError(*args)
Bases:
_BaseExceptionThe response from the IDS was not what should have been expected.
- exception icat.exception.InvalidIngestFileError(detail=None)
Bases:
_BaseException,ValueErrorThe content of the file is not valid ingest format.
Added in version 1.1.0.
Exception hierarchy
The class hierarchy for the exceptions is:
Exception
├── ServerError
│ ├── ICATError
│ │ ├── ICATParameterError
│ │ ├── ICATInternalError
│ │ ├── ICATPrivilegesError
│ │ ├── ICATNoObjectError
│ │ ├── ICATObjectExistsError
│ │ ├── ICATSessionError
│ │ ├── ICATValidationError
│ │ └── ICATNotImplementedError
│ └── IDSError
│ ├── IDSBadRequestError
│ ├── IDSDataNotOnlineError
│ ├── IDSInsufficientPrivilegesError
│ ├── IDSInsufficientStorageError
│ ├── IDSInternalError
│ ├── IDSNotFoundError
│ └── IDSNotImplementedError
├── InternalError
├── ConfigError
├── TypeError
│ └── EntityTypeError
├── VersionMethodError
├── SearchResultError
│ └── SearchAssertionError
├── DataConsistencyError
├── IDSResponseError
├── ValueError
│ └── InvalidIngestFileError
└── Warning
├── QueryWarning
│ ├── QueryNullableOrderWarning
│ └── QueryOneToManyOrderWarning
├── ClientVersionWarning
└── DeprecationWarning
└── ICATDeprecationWarning
Here, Exception, TypeError, Warning, and
DeprecationWarning are build-in exceptions from the Python
standard library.