MCPcopy Create free account
hub / github.com/NCAR/wrf-python / DiagnosticError

Class DiagnosticError

src/wrf/extension.py:42–69  ·  view source on GitHub ↗

Raised when an error occurs in a diagnostic routine.

Source from the content-addressed store, hash-verified

40
41
42class DiagnosticError(Exception):
43 """Raised when an error occurs in a diagnostic routine."""
44 def __init__(self, message=None):
45 """Initialize a :class:`wrf.DiagnosticError` object.
46
47 Args:
48
49 message (:obj:`str`): The error message.
50
51 """
52 self._msg = message
53
54 def __str__(self):
55 return self._msg
56
57 def __call__(self, message):
58 """Callable method to make the exception object raise itself.
59
60 This allows the exception to be thrown from inside Fortran routines
61 by using f2py's callback mechanism. This is no longer used within
62 wrf-python, but may be useful to other users.
63
64 See Also:
65
66 `f2py doc <http://docs.scipy.org/doc/numpy-1.11.0/f2py/>`_
67
68 """
69 raise self.__class__(message)
70
71
72# The routines below are thin wrappers around the Fortran functions. These

Callers 6

_slpFunction · 0.85
_wetbulbFunction · 0.85
_capeFunction · 0.85
_lltoxyFunction · 0.85
_xytollFunction · 0.85
_vintrpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected