21 #ifndef CO_EXCEPTION_H
22 #define CO_EXCEPTION_H
26 #include <lunchbox/compiler.h>
27 #include <lunchbox/types.h>
46 explicit Exception(
const uint32_t type ) : _type( type ) {}
52 virtual uint32_t
getType()
const {
return _type; }
55 const char*
what()
const throw()
override
60 return " Timeout on write operation";
62 return " Timeout on read operation";
64 return " Timeout on barrier";
66 return " Timeout on command queue";
68 return " Unknown Exception";
78 inline std::ostream& operator << ( std::ostream& os,
const Exception& e )
79 {
return os << e.
what(); }
82 #endif // CO_EXCEPTION_H
A base Exception class for Collage operations.
A timeout on a cmd queue operation.
Application-specific exceptions.
A barrier timeout operation.
A write timeout operation.
virtual uint32_t getType() const
A read timeout operation.
virtual ~Exception()
Destruct this exception.
Exception(const uint32_t type)
Construct a new Exception.
const char * what() const override
Output the exception in human-readable form.