4D v13

Progress SET ON ERROR METHOD

Home

 
4D v13
Progress SET ON ERROR METHOD

Progress SET ON ERROR METHOD 


 

Progress SET ON ERROR METHOD ( methodName ) 
Parameter Type   Description
methodName  Text in Name of error method

The Progress SET ON ERROR METHOD method designates a method to execute in the event of an error when using progress bars (for example id unknown, incorrect number of parameters, etc.).

In methodName, you pass the name of the project method of the host database to be called in the event of an error. This method is shared by all the progress windows of the application.   

Note: Since the Progress SET ON ERROR METHOD method belongs to a component, you must remember to assign the "Shared by components and host database" property to the methodName method; otherwise an error is returned.

The methodName method is called with three parameters:

  • $1 (Longint): error number
  • $2 (Text): text of the error
  • $3 (Longint): unique ID of progress bar

Example  

Here is an example of a method called in the event of an error. This method is declared as "shared" in Design mode:

 C_LONGINT($1)
 C_TEXT($2)
 C_LONGINT($3)
 
 C_LONGINT($ErrorID)
 C_TEXT($ErrorText)
 C_LONGINT($ProgressID)
 
 $ErrorID:=$1
 $ErrorText:=$2
 $ProgressID:=$3
 $Error:=""
 $Error:=$Error+"Error number: "+String($ErrorID)+Char(Carriage return)
 $Error:=$Error+$ErrorText+Char(Carriage return)
 $Error:=$Error+"Progress ID: "+String($ProgressID)
 ALERT($Error)

 
PROPERTIES 

Product: 4D
Theme: Progress bars

 
INDEX

Alphabetical list of commands

 
HISTORY 

 
SEE ALSO 

Progress Get On Error Method