r5100@macbookpro: aamine | 2009-06-13 17:42:06 +0900

* net/loveruby/cflat/utils/CommandUtils.java: better error message.
 


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4289 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2009-06-13 08:42:32 +00:00
parent ec67762360
commit fd591cf2b7
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,8 @@
Sat Jun 13 17:41:13 2009 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/utils/CommandUtils.java: better error
message.
Sun Jun 7 13:42:15 2009 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/sysdep/x86/CodeGenerator.java

View File

@ -6,8 +6,8 @@ import java.io.*;
abstract public class CommandUtils {
static public void invoke(List<String> cmdArgs,
ErrorHandler errorHandler, boolean debug) throws IPCException {
if (debug) {
ErrorHandler errorHandler, boolean verbose) throws IPCException {
if (verbose) {
dumpCommand(cmdArgs);
}
try {
@ -18,16 +18,18 @@ abstract public class CommandUtils {
passThrough(proc.getErrorStream());
if (proc.exitValue() != 0) {
errorHandler.error(cmd[0] + " failed."
+ " (status " + proc.exitValue() + ")");
+ " (status " + proc.exitValue() + ")");
throw new IPCException("compile error");
}
}
catch (InterruptedException ex) {
errorHandler.error("gcc interrupted: " + ex.getMessage());
errorHandler.error("external command interrupted: "
+ cmdArgs.get(0) + ": " + ex.getMessage());
throw new IPCException("compile error");
}
catch (IOException ex) {
errorHandler.error(ex.getMessage());
errorHandler.error(
"IO error in external command: " + ex.getMessage());
throw new IPCException("compile error");
}
}