libalerror  2.5.7.1
 All Classes Namespaces Files Functions Macros Pages
Public Member Functions | List of all members
AL::ALError Class Reference

ALError is used to send exception. All NAOqi errors are based on exception. All user commands should be encapsulated in a try catch block. More...

#include "alerror/alerror.h"

Public Member Functions

 ALError (const std::string &pModuleName, const std::string &pMethod, const std::string &pDescription, const char *pszFilename=0, const unsigned int pnNumLine=0)
 Constructor. More...
 
 ALError ()
 Constructor. More...
 
 ALError (const ALError &e)
 Copy Constructor. More...
 
virtual ~ALError () throw ()
 Destructor. More...
 
QI_API_DEPRECATED const std::string toString () const
 deprecated More...
 
QI_API_DEPRECATED const
std::string & 
getModuleName () const
 deprecated More...
 
QI_API_DEPRECATED const
std::string & 
getMethodName () const
 deprecated More...
 
QI_API_DEPRECATED const
std::string & 
getFileName () const
 deprecated More...
 
QI_API_DEPRECATED int getLine () const
 deprecated More...
 
QI_API_DEPRECATED const std::string getDescription () const
 deprecated More...
 

Detailed Description

ALError is used to send exception. All NAOqi errors are based on exception. All user commands should be encapsulated in a try catch block.

Warning
If you want to rethrow the exception you've just been catched (std::exception or ALError), you need to do:
try
{
  throw ALERROR("moduleTest", "methodeTest", "Should be working.");
}
catch (const std::exception& e)   // or catch (const ALError& e)
{
  std::cout << e.what() << std::endl;
  throw;   // and not throw e;
}

Definition at line 48 of file alerror.h.

Constructor & Destructor Documentation

AL::ALError::ALError ( const std::string &  pModuleName,
const std::string &  pMethod,
const std::string &  pDescription,
const char *  pszFilename = 0,
const unsigned int  pnNumLine = 0 
)

Constructor.

Parameters
pModuleNamemodule's name that create error
pMethodmethod's name where error occured
pDescriptionerror's descripton
pszFilenamesource code file name
pnNumLinesource code line number
AL::ALError::ALError ( )

Constructor.

AL::ALError::ALError ( const ALError e)

Copy Constructor.

virtual AL::ALError::~ALError ( )
throw (
)
virtual

Destructor.

Member Function Documentation

QI_API_DEPRECATED const std::string AL::ALError::getDescription ( ) const

deprecated

Deprecated:
use what()
QI_API_DEPRECATED const std::string& AL::ALError::getFileName ( ) const

deprecated

Deprecated:
QI_API_DEPRECATED int AL::ALError::getLine ( ) const

deprecated

Deprecated:
QI_API_DEPRECATED const std::string& AL::ALError::getMethodName ( ) const

deprecated

Deprecated:
QI_API_DEPRECATED const std::string& AL::ALError::getModuleName ( ) const

deprecated

Deprecated:
QI_API_DEPRECATED const std::string AL::ALError::toString ( ) const

deprecated

Deprecated:
use what()

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