Skip to content

Commit

Permalink
Enhance OnTearDown method to include error handling and object valida…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
grongierisc committed Dec 10, 2024
1 parent ca4a7b7 commit 0a4f6a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/iop/cls/IOP/Common.cls
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ Method Connect() As %Status
Method OnTearDown() As %Status
{
set tSC = $$$OK
do ..%class."_dispatch_on_tear_down"()
if $isObject(..%class) {
try {
do ..%class."_dispatch_on_tear_down"()
} catch ex {
set tSC = ex.AsStatus()
}
}
quit tSC
}

Expand Down

0 comments on commit 0a4f6a2

Please sign in to comment.