Tech Tip: Error formula system variable
PRODUCT: 4D | VERSION: 15 R4 | PLATFORM: Mac & Win
Published On: June 14, 2016
4D v15R4 introduces a new system variable to assist with error handling. The new system variable is Error formula and can only be used in an error-catching method set from the ON ERR CALL command. The result can be extracted by copying the contents to a process variable.
Sample:
//GetErrorObject OB SET(obError;"Error";Error) OB SET(obError;"Error method";Error method) OB SET(obError;"Error line";Error line) OB SET(obError;"Error formula";Error formula) |
//SampleMethod C_OBJECT(obError) ON ERR CALL("ErrorTest") $docRef:=Create document($docPath) ON ERR CALL("") |
Results: