Skip to content

Commit 852dab2

Browse files
LockUnlockResourceOperation: unlock() method minor change
1 parent 52916b6 commit 852dab2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cls/iscru/interop/LockUnlockResourceOperation.cls

+10-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,16 @@ Method unlock(resourceId As %String) As %Status
139139
// check if the resource is currently locked by the current session
140140
if ($get(@lockFlagNode) '= ..%SessionId)
141141
{
142-
set sc = $$$ERROR($$$GeneralError, "Resource " _ quotedResourceId _ " is currently locked by some other session: " _ $get(@lockFlagNode))
142+
#dim errText As %String = "Resource " _ quotedResourceId
143+
if ($get(@lockFlagNode) '= "")
144+
{
145+
set errText = errText _ " is currently locked by some other session: " _ $get(@lockFlagNode)
146+
}
147+
else
148+
{
149+
set errText = errText _ " has not been locked"
150+
}
151+
set sc = $$$ERROR($$$GeneralError, errText)
143152
quit
144153
}
145154

0 commit comments

Comments
 (0)