21 #ifndef CO_EXCEPTION_H
22 #define CO_EXCEPTION_H
28 std::ostream& operator << ( std::ostream& os,
const Exception& e );
51 virtual uint32_t
getType()
const {
return _type; }
54 virtual const char*
what()
const throw()
59 return " Timeout on write operation";
61 return " Timeout on read operation";
63 return " Timeout on barrier";
65 return " Timeout on command queue";
67 return " Unknown Exception";
77 inline std::ostream& operator << ( std::ostream& os,
const Exception& e )
78 {
return os << e.
what(); }
81 #endif // CO_EXCEPTION_H
virtual const char * what() const
Output the exception in human-readable form.
A base Exception class for Collage operations.
A read timeout operation.
virtual uint32_t getType() const
Application-specific exceptions.
Exception(const uint32_t type)
Construct a new Exception.
A timeout on a cmd queue operation.
A barrier timeout operation.
A write timeout operation.
virtual ~Exception()
Destruct this exception.