RuntimeException.ErrorNumber

From Xojo Documentation

Revision as of 22:54, 29 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

Var 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
MessageBox("You don't have a key chain.")
End If
Exception err As KeychainException
MessageBox(err.Message + ". Error Code: " + err.ErrorNumber.ToString)