4D v14SVG_Set_error_handler |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14
SVG_Set_error_handler
SVG_Set_error_handler
The SVG_Set_error_handler command can be used to install the host database method method that will be called in the case of an error and which returns the name of the previously installed method. The commands of the component carry out a minimum of verifications when they are called: minimum number of parameters, validity of references, for the element to which a command is applied. The component thus handles errors in a structured manner and allows the host database to retrieve any errors. When default functioning has not been modified, if an error occurs a beep is emitted and the command is interrupted. The host database can retrieve the error number and the name of the faulty command in one of these methods. To do this, the host database must create a method that will receive the error number as the first parameter and the command name as the second parameter. This method, if it is installed by the SVG_Set_error_handler command, will be called when an error occurs; in this case, no beep is generated by the code of the component. If method is omitted or is an empty string, the method is uninstalled and the behavior changes back to the default behavior. Note: The host database method that will be called by the component must have the "Shared by components and host database" property. Installation of the SVG_error_mgmt method (host database method) as the error-handling method: $error:=SVG_Set_error_handler("SVG_error_mgmt") Method code: ` SVG_error_mgmt method
|
PROPERTIES
Product: 4D
HISTORY
Created: Composant 4D SVG v11.3 SEE ALSO ARTICLE USAGE
4D SVG Component ( 4D v13) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||