OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
openassetio::v1::errors Namespace Reference

This namespace contains types related to error handling. More...

Classes

class  BatchElementError
 Structure representing per-element batch operation errors. More...
 
struct  BatchElementException
 Exception thrown when a BatchElementError is converted. More...
 
struct  ConfigurationException
 A special case of InputValidationException for cases where the input comes from external config, rather than function arguments. More...
 
struct  InputValidationException
 Thrown whenever the input to a public API function is invalid for the requested operation. More...
 
struct  NotImplementedException
 Thrown whenever a procedure must abort due to not being implemented. More...
 
struct  OpenAssetIOException
 Exception base for all OpenAssetIO exceptions. More...
 
struct  UnhandledException
 Exceptions emitted from manager plugins that are not handled will be converted to this type and re-thrown when the exception passes through the OpenAssetIO middleware. More...
 

Typedefs

OpenassetIO Exceptions
using AllExceptions = std::tuple< OpenAssetIOException, InputValidationException, ConfigurationException, NotImplementedException, UnhandledException, BatchElementException >
 List of all OpenAssetIO-specific exceptions. More...
 

Functions

OPENASSETIO_CORE_EXPORT std::ostream & operator<< (std::ostream &out, const BatchElementError::ErrorCode &formattable)
 Insertion operator for use with ostreams. More...
 
OPENASSETIO_CORE_EXPORT std::ostream & operator<< (std::ostream &out, const BatchElementError &formattable)
 Insertion operator for use with ostreams. More...
 

Detailed Description

This namespace contains types related to error handling.

Generally there are two types of error handling, "standard" non-batch error handling, which is exception based, and batch errors, which are based upon the BatchElementError type.

All exceptions in OpenAssetIO are derived from the OpenAssetIOException type, the idea being a host can use this as a catch-all exception type when attempting mitigative exception handling.

Batch error handling with BatchElementError is not exceptional, However, OpenAssetIO provides convenience wrappers around some batch functions that makes them exceptional, therefore BatchElementError is converted to its twin, BatchElementException, also found in this namespace.

Typedef Documentation

List of all OpenAssetIO-specific exceptions.

Useful for introspection in language bindings.

Function Documentation

OPENASSETIO_CORE_EXPORT std::ostream& openassetio::v1::errors::operator<< ( std::ostream &  out,
const BatchElementError::ErrorCode formattable 
)

Insertion operator for use with ostreams.

Formats as "humanReadableErrorCodeName".

OPENASSETIO_CORE_EXPORT std::ostream& openassetio::v1::errors::operator<< ( std::ostream &  out,
const BatchElementError formattable 
)

Insertion operator for use with ostreams.

Formats as "humanReadableErrorCodeName: Error message.".