libalerror  1.14
 All Classes Files Functions Macros Pages
Public Member Functions
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>

List of all members.

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.
 ALError ()
 Constructor.
 ALError (const ALError &e)
 Copy Constructor.
virtual ~ALError () throw ()
 Destructor.
QI_API_DEPRECATED const std::string toString () const
 deprecated
QI_API_DEPRECATED const
std::string & 
getModuleName () const
 deprecated
QI_API_DEPRECATED const
std::string & 
getMethodName () const
 deprecated
QI_API_DEPRECATED const
std::string & 
getFileName () const
 deprecated
QI_API_DEPRECATED int getLine () const
 deprecated
QI_API_DEPRECATED const std::string getDescription () const
 deprecated

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

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: