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.