TRY {
KILL B
SET A=0
WRITE "variable A defined?: ",$DATA(A),!
WRITE "variable B defined?: ",$DATA(B),!
WRITE A&B
WRITE !,"Success"
RETURN
}
CATCH exp
{
IF 1=exp.%IsA("%Exception.SystemException") {
WRITE !,"System exception",!
WRITE "Name: ",$ZCVT(exp.Name,"O","HTML"),!
WRITE "Data: ",exp.Data,!!
}
ELSE { WRITE "not a system exception"}
}