Dirac - A Video Codec
Created by the British Broadcasting Corporation.
Go to the documentation of this file.
41 #ifndef DiracException_h
42 #define DiracException_h
102 const std::string& errorMessage,
187 #define DIRAC_LOG_EXCEPTION(exception) \
189 if(exception.GetSeverityCode()!=SEVERITY_NO_ERROR) \
190 std::cerr << exception.GetErrorMessage(); \
196 #define DIRAC_THROW_EXCEPTION(arg1,arg2,arg3) \
198 DiracException exception(arg1,arg2, arg3); \
199 DIRAC_LOG_EXCEPTION(exception) \
206 #define DIRAC_CATCH_AND_RETHROW() \
207 catch (const DiracException& e) { \
208 DiracException exception(e); \
209 DIRAC_LOG_EXCEPTION(exception)\
215 #endif // DiracException_h
DiracSeverityCode GetSeverityCode() const
Get the severity level of this exception.
DiracSeverityCode mSeverityCode
Severity of exception.
Definition: dirac_exception.h:157
Definition of class SequenceHeaderByteIO.
Definition: accessunit_byteio.h:51
DiracException(const DiracErrorCode &errorCode, const std::string &errorMessage, const DiracSeverityCode &severityCode)
Construct from error source ID, error code, and message.
@ SEVERITY_TERMINATE
Definition: dirac_exception.h:81
DiracException & operator=(const DiracException &)
DiracErrorCode mErrorCode
The error code of this exception.
Definition: dirac_exception.h:152
std::string GetErrorMessage() const
Get the error message of this exception.
DiracException is the class which should be used for all exceptions within Dirac.
Definition: dirac_exception.h:88
@ SEVERITY_NO_ERROR
Definition: dirac_exception.h:76
@ ERR_INVALID_SIGNAL_RANGE
Definition: dirac_exception.h:64
@ ERR_INVALID_VIDEO_DEPTH
Definition: dirac_exception.h:66
@ ERR_INVALID_PIXEL_ASPECT_RATIO
Definition: dirac_exception.h:65
virtual ~DiracException()
Destructor.
@ ERR_INVALID_MOTION_VECTOR_PRECISION
Definition: dirac_exception.h:67
@ ERR_END_OF_STREAM
Definition: dirac_exception.h:60
DiracErrorCode
Enumeration of Dirac-defined error codes.
Definition: dirac_exception.h:58
@ SEVERITY_PICTURE_ERROR
Definition: dirac_exception.h:78
DiracSeverityCode
Error-severity states.
Definition: dirac_exception.h:75
@ SEVERITY_ACCESSUNIT_ERROR
Definition: dirac_exception.h:79
@ SEVERITY_SEQUENCE_ERROR
Definition: dirac_exception.h:80
@ ERR_INVALID_VIDEO_FORMAT
Definition: dirac_exception.h:61
@ ERR_UNSUPPORTED_STREAM_DATA
Definition: dirac_exception.h:59
std::string mErrorMessage
The error message.
Definition: dirac_exception.h:162
@ SEVERITY_WARNING
Definition: dirac_exception.h:77
@ ERR_INVALID_PICTURE_RATE
Definition: dirac_exception.h:63
@ ERR_INVALID_INIT_DATA
Definition: dirac_exception.h:68
std::ostream & operator<<(std::ostream &stream, TwoDArray< T > &array)
A function for extracting array data.
Definition: arrays.h:565
@ ERR_INVALID_CHROMA_FORMAT
Definition: dirac_exception.h:62
DiracErrorCode GetErrorCode() const
Get the error code of this exception.
© 2004 British Broadcasting Corporation.
Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's
excellent Doxygen tool.