Error Handling
Several types of errors can occur when using a class or member method from the Hugin C#/.NET Core API. These errors can be the result of errors in the application program, of running out of memory, of corrupted data files, etc.
As a general principle, the Hugin C#/.NET Core API will try to recover from any error as well as possible. The API will then inform the application program of the problem and take no further action. It is then up to the application program to take the appropriate action.
When a member method fails, the data structures will always be left in a consistent state. Moreover, unless otherwise stated explicitly for a particular method, this state can be assumed identical to the state before the failed API call.
To communicate errors to the user of the Hugin C#/.NET Core API, the API defines a set of exception classes. All exception classes are subclasses of the ExceptionHugin class.