GazeboError Class Reference

#include <GazeboError.hh>

List of all members.

Detailed Description

Use gzthrow(data1 << data2) to throw errors.


   Recommended new way:
   gzthrow("This is an error message of type[" << type << "]");
   Old way:
   std::ostringstream stream;
   stream << "This is an error message of type[" << type << "]\n";
   The final "\n" is not needed anymore, the code should be changed to the new type.

Public Member Functions

 GazeboError ()
 GazeboError (const char *file, int line, std::string msg)
 Default constructor.
virtual ~GazeboError ()
std::string GetErrorFile () const
 Return the error function.
int GetErrorLine () const
 Return the error line.
std::string GetErrorStr () const
 Return the error string.


std::ostream & operator<< (std::ostream &out, const gazebo::GazeboError &err)
 Ostream operator for Gazebo Error.

Constructor & Destructor Documentation

GazeboError ( const char *  file,
int  line,
std::string  msg 

Default constructor.

file File name
line Line number where the error occurred
msg Error message

Member Function Documentation

std::string GetErrorFile (  )  const

Return the error function.

The error function name

int GetErrorLine (  )  const

Return the error line.

The error line

std::string GetErrorStr (  )  const

Return the error string.

The error string

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

Last updated Aug 04 2007