Package pygeodesy3 :: Package miscs :: Module errors
[frames] | no frames]

Module errors

Errors, exceptions, exception formatting and exception chaining.

Error, exception classes and functions to format PyGeodesy3 errors, including the setting of exception chaining for Python 3.9+.

By default, exception chaining is turned off. To enable exception chaining, use command line option python -X dev OR set env variable PYTHONDEVMODE=1 or to any non-empty string OR set env variable PYGEODESY3_EXCEPTION_CHAINING=std or to any non-empty string.


Version: 24.02.20

Classes
  ClipError
Clip box or clip region issue.
  CrossError
Error raised for zero or near-zero vectorial cross products, occurring for coincident or colinear points, lines or bearings.
  GeodesicError
Error raised for lack of convergence or other issues in pygeodesy3.geodesic.exact, pygeodesy3.geodesic.wrap or pygeodesy3.Base.karney.
  IntersectionError
Error raised for line or circle intersection issues.
  LenError
Error raised for mis-matching len values.
  LimitError
Error raised for lat- or longitudinal values or deltas exceeding the given limit in functions pygeodesy3.equirectangular, pygeodesy3.equirectangular_, nearestOn* and simplify* or methods with limit or options keyword arguments.
  MGRSError
Military Grid Reference System (MGRS) parse or other Mgrs issue.
  NumPyError
Error raised for NumPy issues.
  ParseError
Error parsing degrees, radians or several other formats.
  PointsError
Error for an insufficient number of points.
  RangeError
Error raised for lat- or longitude values outside the clip, clipLat, clipLon in functions pygeodesy3.parse3llh, pygeodesy3.parseDMS, pygeodesy3.parseDMS2 and pygeodesy3.parseRad or the given limit in functions pygeodesy3.clipDegrees and pygeodesy3.clipRadians.
  RhumbError
Error raised for a pygeodesy3.rhumb.aux_, pygeodesy3.rhumb.solve or pygeodesy3.rhumb.ekx issue.
  TriangleError
Error raised for triangle, inter- or resection issues.
  SciPyError
Error raised for SciPy issues.
  SciPyWarning
Error thrown for SciPy warnings.
  TRFError
Terrestrial Reference Frame (TRF), Epoch, RefFrame or RefFrame conversion issue.
  UnitError
Default exception for units issues for a value exceeding the low or high limit.
  VectorError
Vector3d, Cartesian* or *Nvector issues.
Functions
 
crosserrors(raiser=None)
Report or ignore vectorial cross product errors.
 
exception_chaining(error=None)
Get an error's cause or the exception chaining setting.
 
isError(exc)
Check a (caught) exception.
 
limiterrors(raiser=None)
Get/set the throwing of LimitErrors.
 
rangerrors(raiser=None)
Get/set the throwing of RangeErrors.
Variables
  __all__ = _ALL_LAZY.miscs_errors
Function Details

crosserrors (raiser=None)

 

Report or ignore vectorial cross product errors.

Arguments:
  • raiser - Use True to throw or False to ignore CrossError exceptions. Use None to leave the setting unchanged.
Returns:
Previous setting (bool).

See Also: Property Vector3d[Base].crosserrors.

exception_chaining (error=None)

 

Get an error's cause or the exception chaining setting.

Arguments:
  • error - An error instance (Exception) or None.
Returns:
If error is None, return True if exception chaining is enabled for PyGeodesy3 errors, False if turned off and None if not available. If error is not None, return it's error cause or None.

Note: To enable exception chaining for pygeodesy3 errors, set env var PYGEODESY3_EXCEPTION_CHAINING to any non-empty value prior to import pygeodesy3.

isError (exc)

 

Check a (caught) exception.

Arguments:
  • exc - The exception C({Exception}).
Returns:
True if exc is a pygeodesy3 error, False if exc is a standard Python error of None if neither.

limiterrors (raiser=None)

 

Get/set the throwing of LimitErrors.

Arguments:
  • raiser - Choose True to raise or False to ignore LimitError exceptions. Use None to leave the setting unchanged.
Returns:
Previous setting (bool).

rangerrors (raiser=None)

 

Get/set the throwing of RangeErrors.

Arguments:
  • raiser - Choose True to raise or False to ignore RangeError exceptions. Use None to leave the setting unchanged.
Returns:
Previous setting (bool).