|
WireLess Studio Widgets Developer's Guide |
|
GetLastErrorCode
Call this method to retrieve the last error code.
LONG GetLastErrorCode(void);
Parameters
Return Value
GetLastErrorCode return the last error code set by the methods of the
classes WStWiget,
WStForm and
WStFactory.
Remarks
The error code can be one of the following:
- WS_NO_ERROR: No error
- WS_NOT_ENOUGH_MEMORY : Not enough memory to complete the operation
- WS_DUPLICATED_OBJECT: Can't create a widget with the same unique
id or name.
- WS_CANT_CLONE_OBJECT: The object can't be cloned. e.g.: The
Function
Keys Controller.
- WS_OBJECT_NOT_FOUND: The given id or name doesn't match with any
of the created widgets.
- WS_FORM_NOT_FOUND : The given id or name doesn't match with any of
the created forms.
- WS_FORM_NOT_LOADED : A form is denominated loaded when is currently
in the stack of the forms being displayed in the mobile unit.
- WS_MAX_NUMBER_OF_DISPLAY_OBJECTS_REACHED: The total of widgets that can be attached to a form is 205. When this limit is exceed this error
is set.
- WS_CANT_ADD_OBJECT : The widget can't be added.
- WS_OBJECT_ALREADY_ATTACHED : The widget can't be attached twice on
a form.
- WS_FORM_SERIALIZATION_FAILED : An error has occurred when trying
to serialize the form.
- WS_OBJECT_IS_TOO_BIG : The widget is too big to be serialized.
- WS_INVALID_PARAMS : The given parameter is invalid.
- WS_INVALID_OBJECT_TYPE: The given object type is invalid.
- WS_FORM_IS_BEING_DISPLAYED : The form is currently being displayed.
- WS_CANT_READ_OBJECT_FROM_FILE : The file is corrupted or can't be
found.
- WS_FUNCTION_FAILED : The operation has failed.
- WS_CANT_CREATE_NEW_OBJECT : The maximum limit of widgets has been
reached.
- WS_CANT_CREATE_NEW_FORM : The maximum limit of forms has been reached.
- WS_CONNECTION_LOST : The connection with the mobile unit has been
lost.
- WS_UNEXPECTED_ERROR : An unexpected error has occurred.
Those values can be found on the WSTErrorCodes enumeration.
Example
using WirelessStudioOleWidgets;
WStError oError = new WStError();
WStForm oForm = new WStForm ();
oForm.EndCurrentForm();
int iLastErrorCode = oError.GetLastErrorCode();
Public wsError As New WStError
Public wsForm As New WStForm
Dim lErrorCode as Long
wsForm.EndCurrentForm
lErrorCode = wsError.GetLastErrorCode
See also
GetLastErrorDescription |
EnableDebugMode
WStWiget class reference |
WStForm class reference |
WStFactory class reference |
WStError class reference