|
|
Visits:
2463
(25 on line)
|
Last Update: Dec 21, 2003
|
|
|
|
| | |
| Description Inheritance Example Properties Methods |
| |
| Description |
The TError5 Object lets you implement Error Handling in your APL+Win Windows applications
In general doing so is quite complex because of the "event driven" nature of Windows application where
most programs are global to each others and do not call themsselves but are called by Windows
With TError5, you can decide where you want to return in your Windows application when an error
occurs.
Here is how to use this object:
1. Set a global error handler:
Œelx„'–HANDLERFOR ŒDM'
(the HANDLERFOR utility can be copied from the C:\APLWINxx\TOOLS\HANDLERS.W3 workspace)
2. Add the following line as line 1 of your main application function:
©’{‡*:–ErrorHandler}
(ErrorHandler uses the fmError form which is created by the Classes5 function)
3. Add the following label at the location at which you want your application to resume
in case an error occurs:
return:
4. When an error occurs, the fmError form (the TError5 object) gets displayed
- if you click on the OK button the application resumes at the return: label
- if you click on the Stop button the application stops and the error message is displayed in the APL session
- if you click on the More Info button, another window, with more details about the error, will be displayed
5. This Error Handling object requires the <GoTo> utility to work properly
See also: TestError5 TTestError5 |
| Description Inheritance Example Properties Methods |
| |
| Inheritance |
Inherits from: TForm5 TObject5 |
| Description Inheritance Example Properties Methods |
| |
| Example |
| |
 |
| |
The above form is generated by the following APL+Win Objects code: |
TestError5
|
| |
| Description Inheritance Example Properties Methods |
| |
| Properties |
| |
|
| Description Inheritance Example Properties Methods |
| |
| Methods |
| |
|
|