Skip to content

Commit ceba5d0

Browse files
committed
CALL文でモジュール呼び出しに失敗したときの処理を修正した.
1 parent 8d12e42 commit ceba5d0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,38 +190,45 @@ static public CobolRunnable resolve(AbstractCobolField cobolField) throws CobolC
190190
static public CobolRunnable resolve(String name) throws CobolCallException {
191191
String fullName;
192192
CobolRunnable runnable = null;
193+
System.out.println("[dbg in lib] 0");
193194

194195
/* encode program name */
195196
char c1 = name.charAt(0);
196197
if(c1 >= '0' && c1 <= '9') {
197198
name = "_" + name;
198199
}
200+
System.out.println("[dbg in lib] 1");
199201
name = name.replaceAll("-", "__");
202+
System.out.println("[dbg in lib] 2");
200203

201204
/* search the cache */
202205
if(callTable.containsKey(name)) {
203206
return callTable.get(name);
204207
}
205208

209+
System.out.println("[dbg in lib] 3");
206210
if(name_convert == 1) {
207211
name = name.toLowerCase();
208212
}else if(name_convert == 2) {
209213
name = name.toUpperCase();
210214
}
211215

216+
System.out.println("[dbg in lib] 4");
212217
if(defaultPackageName != null) {
213218
fullName = defaultPackageName + "." + name;
214219
}else {
215220
fullName = name;
216221
}
217222

223+
System.out.println("[dbg in lib] 5");
218224
/* search the main program */
219225
runnable = getInstance(fullName);
220226
if(runnable != null) {
221227
callTable.put(name, runnable);
222228
return runnable;
223229
}
224230

231+
System.out.println("[dbg in lib] 6");
225232
/* search external modules */
226233
for (String package_path : package_paths) {
227234
fullName = package_path + "." + name;
@@ -232,8 +239,9 @@ static public CobolRunnable resolve(String name) throws CobolCallException {
232239
}
233240
}
234241

242+
System.out.println("[dbg in lib] 7");
235243
//Not found
236-
throw CobolCallException.ex;
244+
throw new CobolCallException();
237245
}
238246

239247
/**
@@ -275,7 +283,7 @@ static private CobolRunnable getInstance(String name) {
275283
}
276284
} catch (ClassNotFoundException e) {
277285
//TODO
278-
e.printStackTrace();
286+
//e.printStackTrace();
279287
//Continue
280288
}
281289

libcobj/src/jp/osscons/opensourcecobol/libcobj/exceptions/CobolCallException.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ public class CobolCallException extends Exception {
2626

2727
public static CobolCallException ex;
2828

29-
{
30-
ex = new CobolCallException();
31-
}
32-
3329
/**
3430
* コンストラクタ
3531
*/

0 commit comments

Comments
 (0)