nbproject/build-impl.xml~
src/java/oms/utils/Utils.java
@@ -12,7 +12,6 @@ |
import csip.SessionLogger; |
import csip.utils.Binaries; |
import java.io.File; |
-import java.io.FilenameFilter; |
import java.io.IOException; |
import java.util.Arrays; |
import java.util.Date; |
@@ -23,8 +22,6 @@ |
import oms3.io.CSTable; |
import oms3.io.DataIO; |
import org.apache.commons.io.FileUtils; |
-import org.apache.commons.io.IOCase; |
-import org.apache.commons.io.filefilter.WildcardFileFilter; |
import org.apache.commons.lang.ArrayUtils; |
|
/** |
@@ -317,13 +314,15 @@ |
// Create/execute a Ages. |
Executable p = createProcess(dsl, ws, param, res, LOG); |
int result = p.exec(); |
- File f = p.stderr(); |
- if (f.exists() && f.length() > 0) { |
- String err = FileUtils.readFileToString(f, "UTF-8"); |
- LOG.info("Ages execution error. " + f + ":\n" + err); |
- throw new ServiceException("Ages execution error. " + f + ":\n" + err); |
+ if (result != 0) { |
+ File f = p.stderr(); |
+ if (f.exists() && f.length() > 10) { |
+ String err = FileUtils.readFileToString(f, "UTF-8"); |
+ LOG.info("Ages execution error. " + f + ":\n" + err); |
+ throw new ServiceException("Ages execution error. " + f + ":\n" + err); |
+ } |
+ throw new ServiceException("Ages execution error." + result); |
} |
- throw new ServiceException("Ages execution error." + result); |
} |
|
/** |