GeographicLib
1.21
|
Exception handling for GeographicLib. More...
#include <GeographicLib/Constants.hpp>
Public Member Functions | |
GeographicErr (const std::string &msg) |
Exception handling for GeographicLib.
A class to handle exceptions. It's derived from std::runtime_error so it can be caught by the usual catch clauses.
Example of use:
// Example of using the GeographicLib::GeographicErr class // $Id: aaa4cf5e9b5070f9a6307a59daabf578880b85d3 $ #include <iostream> #include <GeographicLib/Constants.hpp> using namespace std; using namespace GeographicLib; int main() { try { throw GeographicErr("Test throwing an exception"); } catch (const GeographicErr& e) { cout << "Caught exception: " << e.what() << "\n"; } return 0; }
GeographicLib::GeographicErr::GeographicErr | ( | const std::string & | msg | ) | [inline] |
Constructor
[in] | msg | a string message, which is accessible in the catch clause, via what(). |
Definition at line 323 of file Constants.hpp.