c++_api/inc/opals/Exception.hpp
14 // Exception classes allow applications to react programmatically on specific error types (without analysing the error message).
15 // The organisation of exception classes into a hierarchy allows applications to react on groups of more specific errors.
17 // It can be assumed that most errors are caused by incorrect or missing input parameters. So there should be a fine
18 // granulation of classes concerning those errors. All exception classes must be derived from opals::Exceptions::Base,
19 // either directly or indirectly. Exceptions are only throw if the program cannot continue safely. For other "problematic"
23 // Opals exception classes provide an error code, which will be the return code of opals executables.
25 // To avoid different messages for the same error, offer as few text input as possible. Which means that the exception
28 // For errors that can only appear if opals module programmers don't use the opals framework correctly, it is
31 // is necessary to add new opals exceptions to the OPALS_EXCEPTIONS preprocessor list in ExceptionProxy.hpp
35 // 1) If the new exception describes an existing exception more precisely, then derive from that existing class.
38 // 3) In the constructor, specify a textual description of the error as a prefix to the constructor argument (const char*)
39 // 4) Add the new exception class to the preprocessor list OPALS_EXCEPTIONS in ExceptionProxy.hpp
60 paramQueriedBeforeSet, ///< thrown if a parameter value is queried although the value has not been set (neither internally, nor externally)
64 aliasColumnName, ///< thrown if an alias is set for unknown column name (only predefined column name are allowed)
66 gdalReadAccess, ///< thrown if the provided file cannot be opened as a GDAL raster (GDALOpen returns NULL)
75 fileCorrupt = 2000, ///< general file corruption error: thrown if a file to be used is not interpretable
76 logFileCorrupt, ///< thrown if an existing log file shall be used, but the correct position to proceed writing cannot be determined
77 paramFileCorrupt, ///< thrown if an existing parameter file shall be appended to, but the correct position to proceed writing cannot be determined, resulting in a probably ill-formed XML-file
81 python = 4000, ///< An error occurred during a call to a Python interpreter. Reflects Python's built-in class exceptions.BaseException
85 To avoid future changes of error codes due to changes of Python's exception hierarchy, we separate the codes by 10.
86 Note: The following hierarchy is the one of Python 2.7. Since then, exception have been both introduced and removed. Most notably, StandardError has been removed.
143 /**< Python's base class for those built-in exceptions that are raised for various arithmetic errors. */
149 /**< Raised by Python when an operation or function is applied to an object of inappropriate type. */
151 /**< Raised by Python when a built-in operation or function receives an argument that has the right type but an inappropriate value. */
157 };
160 /// \brief The namespace containing all exception types that may be thrown from within namespace opals
359 // Python 3 does not define StandardError, so we derive all Python* exceptions directly from PythonException.
405 UserInterrupt(const char *errorMessage, ErrorCode::Type code); ///< Constructor for child classes
