Back to index

salome-kernel  6.5.0
Public Member Functions | Protected Attributes | Private Member Functions
DSC_Exception Struct Reference

#include <DSC_Exception.hxx>

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

List of all members.

Public Member Functions

 DSC_Exception (const std::string &text, const char *fileName="", const unsigned int lineNumber=0, const char *funcName="")
virtual const char * what (void) const throw ()
virtual ~DSC_Exception (void) throw ()
virtual const std::string & getExceptionName () const

Protected Attributes

std::string _dscText
std::string _filefuncName
std::string _exceptionName
int _lineNumber
std::string _what

Private Member Functions

std::string setFileFuncName (const char *fileName, const char *funcName)

Detailed Description

Definition at line 99 of file DSC_Exception.hxx.


Constructor & Destructor Documentation

DSC_Exception::DSC_Exception ( const std::string &  text,
const char *  fileName = "",
const unsigned int  lineNumber = 0,
const char *  funcName = "" 
) [inline]

Definition at line 108 of file DSC_Exception.hxx.

                                          :
    SALOME_Exception(text.c_str()) ,
    _dscText(text),
    _filefuncName(setFileFuncName(fileName?fileName:"",funcName?funcName:"")),
    _lineNumber(lineNumber),
    _exceptionName("DSC_Exception")
  {
    // Mise en cohérence avec l'exception SALOME (à revoir)
    delete [] ((char*)SALOME_Exception::_text);
    if (! _filefuncName.empty() )
      SALOME_Exception::_text = makeText(text.c_str(),_filefuncName.c_str(),lineNumber) ;
    else
      SALOME_Exception::_text = makeText(text.c_str(),0,lineNumber) ;
    
    OSS oss ;
    oss << _exceptionName ;
    if (!_filefuncName.empty() ) oss << " in " << _filefuncName;
    if (_lineNumber) oss << " [" << _lineNumber << "]";
    oss << " : " << _dscText;
    _what = oss;
  }

Here is the call graph for this function:

virtual DSC_Exception::~DSC_Exception ( void  ) throw () [inline, virtual]

Definition at line 143 of file DSC_Exception.hxx.

{};

Member Function Documentation

virtual const std::string& DSC_Exception::getExceptionName ( ) const [inline, virtual]

Reimplemented in CalciumException.

Definition at line 145 of file DSC_Exception.hxx.

{return _exceptionName;};
std::string DSC_Exception::setFileFuncName ( const char *  fileName,
const char *  funcName 
) [inline, private]

Definition at line 149 of file DSC_Exception.hxx.

                                                                          {
    ASSERT(fileName);
    ASSERT(funcName);
    OSS oss;
    if ( strcmp(fileName,"") )
      oss << fileName << "##" << funcName;
  
    return oss;
  };
virtual const char* DSC_Exception::what ( void  ) const throw () [inline, virtual]

Definition at line 133 of file DSC_Exception.hxx.

  {
    return _what.c_str()  ;
  }

Here is the caller graph for this function:


Member Data Documentation

std::string DSC_Exception::_dscText [protected]

Definition at line 157 of file DSC_Exception.hxx.

std::string DSC_Exception::_exceptionName [protected]

Reimplemented in CalciumException.

Definition at line 163 of file DSC_Exception.hxx.

std::string DSC_Exception::_filefuncName [protected]

Definition at line 162 of file DSC_Exception.hxx.

int DSC_Exception::_lineNumber [protected]

Definition at line 164 of file DSC_Exception.hxx.

std::string DSC_Exception::_what [protected]

Definition at line 165 of file DSC_Exception.hxx.


The documentation for this struct was generated from the following file: