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:
-
As errors with a full stack trace with description and parameters number range below 4000.
-
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)