RuntimeException.ErrorNumber

From Xojo Documentation

Property (As Integer )
aRuntimeException.ErrorNumber = newIntegerValue
or
IntegerValue = aRuntimeException.ErrorNumber

Supported for all project types and targets.

Used to contain an error number that describes the runtime error.

Sample Code

The following example displays a message box if, for example, you try to create more than one KeyChainItem for the same application.

Dim newItem As KeyChainItem
If System.KeyChainCount > 0 Then
newItem = New KeyChainItem
// Indicate the name of the application
newItem.ServiceName = "MyApplication"

// Create a new keychain item for the application and assign the password
System.KeyChain.AddPassword(newItem, "SecretPassword")
Else
Beep
MsgBox("You don't have a key chain.")
End If
Exception err As KeyChainException
MsgBox(err.Message + ". Error Code: " + Str(err.ErrorNumber))