Gazebo

GazeboError Class Reference
[Server]

#include <GazeboError.hh>

List of all members.


Detailed Description

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

Example:

   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";
   gzthrow(stream.str());
   The final "\n" is not needed anymore, the code should be changed to the new type.
   


Public Member Functions

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

Friends

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.

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


Member Function Documentation

std::string GetErrorFile (  )  const

Return the error function.

Returns:
The error function name

int GetErrorLine (  )  const

Return the error line.

Returns:
The error line

std::string GetErrorStr (  )  const

Return the error string.

Returns:
The error string


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

Last updated Aug 04 2007