Throwing exceptions - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

Should you need to raise an error message, we have a SPF exception class that can be used. If you are using the Desktop Client, exceptions can be displayed in two ways:

  1. As errors with a full stack trace with description and parameters number range below 4000.

  2. As a warning/info type message without stack trace, more user friendly with a number range above 4000.

The exception number range determines what message is displayed. The exception is thrown in exactly the same way.

Below is an example of an error exception this will show a full stack trace. Note the ability to enter a parameter.

Catch ex As Exception

Throw New SPFException(1347, "Exception raised", New String() {Me.GetType.ToString}, ex)