NLMISC::Exception Class Reference

#include <common.h>

Inheritance diagram for NLMISC::Exception:

NL3D::EBadBind NL3D::EBadDisplay NL3D::EDru NLAIE::IException NLMISC::EAllocationFailure NLMISC::EConfigFile NLMISC::EFatalError NLMISC::EInputDevice NLMISC::EPathNotFound NLMISC::EReallocationFailed NLMISC::ERegistry NLMISC::EStream NLMISC::EThread NLMISC::ETrapDebug NLNET::ESocket NLPACS::EChainQuad NLPACS::EEdgeQuad NLSOUND::ESampleBankNotFound NLSOUND::ESoundBankNotFound NLSOUND::ESoundDriver NLSOUND::ESoundFileNotFound

Detailed Description

Base class for all NeL exception. It enables to construct simple string at the ctor.

Definition at line 241 of file common.h.

Public Member Functions

 Exception (const char *format,...)
 Exception (const std::string &reason)
 Exception ()
virtual const char * what () const throw ()
virtual ~Exception () throw ()

Protected Attributes

std::string _Reason


Constructor & Destructor Documentation

NLMISC::Exception::Exception  ) 
 

Definition at line 656 of file common.cpp.

00656                      : _Reason("Unknown Exception")
00657 {
00658 //      nlinfo("Exception will be launched: %s", _Reason.c_str());
00659 }

NLMISC::Exception::Exception const std::string &  reason  ) 
 

Definition at line 661 of file common.cpp.

References _Reason, and nlinfo.

00661                                             : _Reason(reason)
00662 {
00663         nlinfo("Exception will be launched: %s", _Reason.c_str());
00664 }

NLMISC::Exception::Exception const char *  format,
... 
 

Definition at line 666 of file common.cpp.

References _Reason, format, nlinfo, and NLMISC_CONVERT_VARGS.

00667 {
00668         NLMISC_CONVERT_VARGS (_Reason, format, NLMISC::MaxCStringSize);
00669         nlinfo("Exception will be launched: %s", _Reason.c_str());
00670 }

virtual NLMISC::Exception::~Exception  )  throw () [inline, virtual]
 

Definition at line 249 of file common.h.

00249 {};


Member Function Documentation

const char * NLMISC::Exception::what  )  const throw () [virtual]
 

Reimplemented in NL3D::EBadBind.

Definition at line 672 of file common.cpp.

00673 {
00674         return _Reason.c_str();
00675 }


Field Documentation

std::string NLMISC::Exception::_Reason [protected]
 

Definition at line 244 of file common.h.

Referenced by Exception().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 13:45:05 2004 for NeL by doxygen 1.3.6