ABL Structured Error Handling: Mike Fechner, Consultingwerk Ltd. Mike - Fechner@consultingwerk - de
ABL Structured Error Handling: Mike Fechner, Consultingwerk Ltd. Mike - Fechner@consultingwerk - de
ABL Structured Error Handling: Mike Fechner, Consultingwerk Ltd. Mike - Fechner@consultingwerk - de
http://www.consultingwerk.de/ 3
Agenda
▪ (Runtime) Error
▪ Application Error
▪ Stop Conditions
▪ Quit Conditions
(CATCH/
FINALLY)
▪ .p file, .w file
▪ Internal procedure
▪ User-defined function
▪ Database trigger
▪ User-interface trigger
▪ Class method, including
– Constructor
– GET/SET
– Destructor
ABL Structured Error Handling 9
ABL Structured Error Handling 10
ABL Structured Error Handling 11
ABL Structured Error Handling 12
ABL Structured Error Handling 13
Classic Error Handling Issues
▪ Must use! For everyone using dynamic queries etc… every code
that requires clean up at runtime
Obj ect
inherits
«interface»
«.NET» Error ProError
System.Exception implements implements
▪ Locate Consultingwerk.Exceptions.Exception in
http://help.consultingwerkcloud.com/smartcomponent_library/rele
ase/
▪ NEW AppError ()
▪ NEW AppError (CHARACTER)
▪ NEW AppError (CHARACTER, INTEGER)
UNDO, THROW
▪ Runtime error often the root cause for application raised error
▪ Application raised error may be adding context
▪ No Progress.Lang.Error
– Progress.Lang.Stop - STOP Statement
– Progress.Lang.LockConflict - -lkwtmo exceeded
– Progress.Lang.StopAfter - STOP-AFTER exceeded
– Progress.Lang.UserInterrrupt - CTRL-BREAK
▪ Progress.Lang.Error derived
– Progress.Lang.StopError - RUN invalid.p, etc.
▪ Consultingwerk.Exceptions.Exception
– InnerException Implementation
– SessionInfo from AppServer to Client
▪ Consultingwerk.Assertion.BufferAssert:HasField (hBuffer,
“CustNum”) .
http://www.consultingwerk.de/ 69