| Parameter | Description |
|---|---|
| eErrorCode | an error-code constant that you want the natural-language description of |
A natural-langage description of the error.
Function OpenWorkspaceErrorMessage Integer eErrorCode Returns String
| Call: | Get OpenWorkspaceErrorMessage eErrorCode to StringVariable |
OpenWorkspaceErrorMessage returns a natural-language description for an error code that was returned opening a Workspace, which is useful for giving users detailed reasons for the failure.
For example, if you passed wsWorkspaceNotFound as the eErrorCode parameter, then the return might be something similar to "The Workspace name was not found in the list of registered Workspaces."
| Note: | If you use cApplication's DoOpenWorkspace, then that method will automatically show the error translation before aborting. |
Object oApplication is a cApplication
Procedure OnCreate
Handle hoWorkspace
Integer eOpened
String sError
Get phoWorkspace To hoWorkspace
Get OpenWorkspace of hoWorkspace "ABC, Inc.Accounts" To eOpened
If (eOpened <> wsWorkspaceOpened) Begin
Get OpenWorkspaceErrorMessage of hoWorkspace eOpened To sError
Send Stop_Box sError "Error Opening Workspace"
Abort
End
End_Procedure // OnCreate
End_Object // oApplication
See Also