Public Member Functions | Protected Member Functions | Private Attributes

ivd_InternalError Class Reference
[Common, basic classes, functions and types]

ivd_InternalError is thrown when an unexpected critical situation is detected. More...

#include <ivderror.h>

Inheritance diagram for ivd_InternalError:
Inheritance graph
[legend]
Collaboration diagram for ivd_InternalError:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ivd_InternalError (const int a_ivdErr, const string &a_context="", bool a_logError=true) throw ()
 ivd_InternalError (const int a_ivdErr, const string &a_context, const string &a_detailed, bool a_logError=true) throw ()
virtual ~ivd_InternalError () throw ()

Protected Member Functions

virtual string GetErrorText () const
 Member function to supply ivd_Exception::m_errorText.

Private Attributes

 log_CLASSID_m

Detailed Description

ivd_InternalError is thrown when an unexpected critical situation is detected.

These exceptions are caught by main() function only, because ivd_InternalError means data corruption or a bug that must be resolved immediatelly.

Use IVD error codes (same as for ivd_Error). Note that log entry is created by default for ivd_InternalError.

See example in ivd_SysError.

Author:
Matej Kenda, Hermes SoftLab
See also:
ivd_Exception
ivd_Error
ivd_SysError
log_MARKLINE_m
Warning:
THROW ivd_InternalError only in situations that really SHOULD NOT happen.

Definition at line 162 of file ivderror.h.


Constructor & Destructor Documentation

ivd_InternalError::ivd_InternalError ( const int  a_ivdErr,
const string &  a_context = "",
bool  a_logError = true 
) throw ()

Definition at line 74 of file ivd_internalerror.cpp.

References evt_CRITICAL, log_WriteEvent(), and s_className.

    : ivd_BaseException(a_ivdErr, a_context, true)  {

    FormatText(s_className);

    // Write the error to the ivd.log
    ostringstream sstr;
    sstr
        << "Internal error. Contact support. "
        << "(" << this->GetFriendly() << ").";

    log_WriteEvent(evt_CRITICAL, sstr.str());

    abort();
}

Here is the call graph for this function:

ivd_InternalError::ivd_InternalError ( const int  a_ivdErr,
const string &  a_context,
const string &  a_detailed,
bool  a_logError = true 
) throw ()

Definition at line 91 of file ivd_internalerror.cpp.

References evt_CRITICAL, log_WriteEvent(), and s_className.

    : ivd_BaseException(a_ivdErr, a_context, a_detailed, true)  {

    FormatText(s_className);

    // Write the error to the ivd.log
    ostringstream sstr;
    sstr
        << "Internal error. Contact support. "
        << "(" << this->GetFriendly() << ").";

    log_WriteEvent(evt_CRITICAL, sstr.str());

    abort();
}

Here is the call graph for this function:

ivd_InternalError::~ivd_InternalError (  )  throw () [virtual]

Definition at line 111 of file ivd_internalerror.cpp.

                                              {
}


Member Function Documentation

string ivd_InternalError::GetErrorText (  )  const [protected, virtual]

Member function to supply ivd_Exception::m_errorText.

Reimplemented from ivd_BaseException.

Definition at line 114 of file ivd_internalerror.cpp.

References ivd_GetErrorText(), and ivd_BaseException::m_error.

                                             {
    return ivd_GetErrorText(m_error);
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from ivd_BaseException.

Definition at line 182 of file ivderror.h.


The documentation for this class was generated from the following files: