4D v16

SVG_Set_error_handler

Home

 
4D v16
SVG_Set_error_handler

SVG_Set_error_handler 


 

SVG_Set_error_handler {( Methodenname )} -> Funktionsergebnis 
Parameter Typ   Beschreibung
Methodenname  String in Name of method to install
Funktionsergebnis  String in Name of method previously installed

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
 ALERT("Error No."+String($1)+" during execution of the command \""+$2+"\"")



Siehe auch 

SVG_Read_last_error

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: Utilities
Nummer: 65912

 
GESCHICHTE 

Erstellt: Composant 4D SVG v11.3

 
ARTIKELVERWENDUNG

4D SVG ( 4D v16)