Skip to content

Commit 9910d29

Browse files
committed
fix CobolResolve.java
1 parent 31a4068 commit 9910d29

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,12 @@ private static void cancelCallStackList(CobolCallStackList p) {
552552
// プログラムをキャンセル
553553
String programName = p.getName();
554554
if (programName != null) {
555-
CobolRunnable runnable = callTable.get(programName);
556-
if (runnable != null && !runnable.isActive()) {
557-
runnable.cancel();
555+
try {
556+
CobolResolve.cobCancel(programName);
557+
} catch (CobolStopRunException e) {
558+
throw new CobolRuntimeException(
559+
CobolRuntimeException.COBOL_FATAL_ERROR,
560+
"Failed to cancel program: " + programName);
558561
}
559562
}
560563

0 commit comments

Comments
 (0)