21 #ifndef CO_EXCEPTION_H
22 #define CO_EXCEPTION_H
26 #include <lunchbox/compiler.h>
27 #include <lunchbox/types.h>
44 explicit Exception(
const uint32_t type ) : _type( type ) {}
50 virtual uint32_t
getType()
const {
return _type; }
53 const char*
what()
const throw()
override
58 return " Timeout on write operation";
60 return " Timeout on read operation";
62 return " Unknown Exception";
72 inline std::ostream& operator << ( std::ostream& os,
const Exception& e )
73 {
return os << e.
what(); }
76 #endif // CO_EXCEPTION_H
A base Exception class for Collage operations.
Application-specific exceptions.
A write timeout operation.
virtual uint32_t getType() const
A read timeout operation.
virtual ~Exception()
Destruct this exception.
Object-oriented network library.
Exception(const uint32_t type)
Construct a new Exception.
const char * what() const override
Output the exception in human-readable form.