Skip to content

Commit 8f61e94

Browse files
committed
Check %Status from %Next()
1 parent e96bd1f commit 8f61e94

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cls/SourceControl/Git/Change.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ ClassMethod InstanceUncommittedExecute(ByRef qHandle As %Binary) As %Status
203203
$$$ThrowOnError(statement.%Prepare(qHandle("q"), 0))
204204
set resultSet = statement.%Execute()
205205
throw:resultSet.%SQLCODE<0 ##class(%Exception.SQL).CreateFromSQLCODE(resultSet.%SQLCODE,resultSet.%Message)
206-
while resultSet.%Next() {
206+
while resultSet.%Next(.sc) {
207+
$$$ThrowOnError(sc)
207208
set qHandle("changes", $increment(qHandle("changes")), "InternalName") = resultSet.%GetData(1)
208209
set qHandle("changes", qHandle("changes"), "User") = resultSet.%GetData(2)
209210
set qHandle("changes", qHandle("changes"), "Namespace") = namespace

cls/SourceControl/Git/Utils.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2451,7 +2451,8 @@ ClassMethod InstanceWideUncommittedCheck(InternalName As %String, Output User, O
24512451
set isUncommitted = 0
24522452
set resultSet = ##class(SourceControl.Git.Change).InstanceUncommittedFunc()
24532453
throw:resultSet.%SQLCODE<0 ##class(%Exception.SQL).CreateFromSQLCODE(resultSet.%SQLCODE,resultSet.%Message)
2454-
while resultSet.%Next() {
2454+
while resultSet.%Next(.sc) {
2455+
$$$ThrowOnError(sc)
24552456
set fileName = resultSet.InternalName
24562457
if (InternalName = fileName) && (resultSet.Namespace '= $namespace) {
24572458
set isUncommitted = 1

0 commit comments

Comments
 (0)