Skip to content

Commit 0a4f6a2

Browse files
committed
Enhance OnTearDown method to include error handling and object validation
1 parent ca4a7b7 commit 0a4f6a2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/iop/cls/IOP/Common.cls

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ Method Connect() As %Status
118118
Method OnTearDown() As %Status
119119
{
120120
set tSC = $$$OK
121-
do ..%class."_dispatch_on_tear_down"()
121+
if $isObject(..%class) {
122+
try {
123+
do ..%class."_dispatch_on_tear_down"()
124+
} catch ex {
125+
set tSC = ex.AsStatus()
126+
}
127+
}
122128
quit tSC
123129
}
124130

0 commit comments

Comments
 (0)