GeographicLib 2.7
Loading...
Searching...
No Matches
GeographicLib::GeographicErr Class Reference

Exception handling for GeographicLib. More...

#include <GeographicLib/Constants.hpp>

Inheritance diagram for GeographicLib::GeographicErr:

Public Member Functions

 GeographicErr (const std::string &msg)

Detailed Description

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
#include <iostream>
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";
}
}
int main(int argc, const char *const argv[])
Header for GeographicLib::Constants class.
Exception handling for GeographicLib.
GeographicErr(const std::string &msg)
Namespace for GeographicLib.

Definition at line 344 of file Constants.hpp.

Constructor & Destructor Documentation

◆ GeographicErr()

GeographicLib::GeographicErr::GeographicErr ( const std::string & msg)
inline

Constructor

Parameters
[in]msga string message, which is accessible in the catch clause via what().

Definition at line 353 of file Constants.hpp.

Referenced by GeographicLib::AlbersEqualArea::AlbersEqualArea(), GeographicLib::AlbersEqualArea::AlbersEqualArea(), GeographicLib::AlbersEqualArea::AlbersEqualArea(), GeographicLib::Triaxial::Cartesian3::anytocart2(), GeographicLib::Triaxial::Cartesian3::anytocart2(), GeographicLib::AuxLatitude::AuxLatitude(), GeographicLib::Geoid::CacheArea(), GeographicLib::Triaxial::Cartesian3::cart2toany(), GeographicLib::Triaxial::Cartesian3::cart2toany(), GeographicLib::MGRS::Check(), GeographicLib::Utility::date(), GeographicLib::Utility::day(), GeographicLib::MGRS::Decode(), GeographicLib::DMS::DecodeAngle(), GeographicLib::AngleT< T >::DecodeAzimuth(), GeographicLib::DMS::DecodeAzimuth(), GeographicLib::AngleT< T >::DecodeLatLon(), GeographicLib::DMS::DecodeLatLon(), GeographicLib::UTMUPS::DecodeZone(), GeographicLib::Triaxial::Ellipsoid3::Ellipsoid3(), GeographicLib::Triaxial::Ellipsoid3::Ellipsoid3(), GeographicLib::UTMUPS::EncodeZone(), GeographicLib::GARS::Forward(), GeographicLib::Geohash::Forward(), GeographicLib::Georef::Forward(), GeographicLib::MGRS::Forward(), GeographicLib::UTMUPS::Forward(), GeographicLib::Geocentric::Geocentric(), GeographicLib::GeodesicExact::GeodesicExact(), GeographicLib::Geoid::Geoid(), GeographicLib::GravityModel::GravityModel(), GeographicLib::OSGB::GridReference(), GeographicLib::OSGB::GridReference(), GeographicLib::Intersect::Intersect(), GeographicLib::LambertConformalConic::LambertConformalConic(), GeographicLib::LambertConformalConic::LambertConformalConic(), GeographicLib::LambertConformalConic::LambertConformalConic(), GeographicLib::MagneticModel::MagneticModel(), main(), GeographicLib::PolarStereographic::PolarStereographic(), GeographicLib::SphericalEngine::coeff::readcoeffs(), GeographicLib::EllipticFunction::Reset(), GeographicLib::GeoCoords::Reset(), GeographicLib::GARS::Reverse(), GeographicLib::Geohash::Reverse(), GeographicLib::Georef::Reverse(), GeographicLib::MGRS::Reverse(), GeographicLib::UTMUPS::Reverse(), GeographicLib::AlbersEqualArea::SetScale(), GeographicLib::LambertConformalConic::SetScale(), GeographicLib::PolarStereographic::SetScale(), GeographicLib::SphericalHarmonic2::SphericalHarmonic2(), GeographicLib::SphericalHarmonic2::SphericalHarmonic2(), GeographicLib::UTMUPS::StandardZone(), GeographicLib::UTMUPS::Transfer(), GeographicLib::TransverseMercator::TransverseMercator(), GeographicLib::TransverseMercatorExact::TransverseMercatorExact(), and GeographicLib::Utility::val().


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