• Manual
  • HAPI Namespace
Show / Hide Table of Contents
  • General Information
  • Object-Oriented Specification
  • Memory Management
  • Error Handling
  • Using the Hugin C#/.NET Core/.NET 5/.NET 6 API
  • Examples
    • Example 1: Load and Propagate
    • Example 2: Build and Propagate
    • Example 3: Sequential Learning
    • Example 4: Node naming scheme for OOBNs
  • Acknowledgements

Error Handling

Several types of errors can occur when using a class or member method from the Hugin C#/.NET Core/.NET 5/.NET 6 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/.NET 5/.NET 6 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/.NET 5/.NET 6 API, the API defines a set of exception classes. All exception classes are subclasses of the ExceptionHugin class.

In This Article
Back to top Copyright (C) 2019-2021 Hugin Expert A/S