Hi!
Want to share with you code snippet of try catch block I usually use in methods which should return %Status.
{
try {
$$$TOE(sc,StatusMethod())
}
catch e {
set sc=e.AsStatus()
do e.Log()
}
Quit sc
}
Here $$$TOE is a short form of $$$TROWONERROR macro.
Inside macro StatusMethod is any method you call which will return %Status value. This value will be placed into sc variable.
In case of sc contains error execution will be routed to try catch block. You can wrap any Status methods calls in your code if you need to catch the errors coming from them.
In try ca
