GazeboError Class Reference
[Server]
#include <GazeboError.hh>
Detailed Description
Class to handle errors Usegzthrow(std::string) to throw errors.Example:
std::ostringstreaom stream; stream << "This is an error message of type[" << type << "]\n"; gzthrow(stream.str());
Public Member Functions | |
| GazeboError () | |
| GazeboError (const char *file, int line, std::string msg) | |
| virtual | ~GazeboError () |
| std::string | GetErrorFile () const |
| int | GetErrorLine () const |
| std::string | GetErrorStr () const |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const gazebo::GazeboError &err) |
Constructor & Destructor Documentation
| GazeboError | ( | ) |
Constructor
| 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
| virtual ~GazeboError | ( | ) | [virtual] |
Destructor
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
Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const gazebo::GazeboError & | err | |||
| ) | [friend] |
Ostream operator for Gazebo Error
The documentation for this class was generated from the following file: