if (!executeInstallScript(pack, monitor, tempDir)) {
Log.err("Fail to execute install script.");
- throw new IMFatalException(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR + " (" + pack + ")");
+ throw new IMFatalException(ErrorController.getMessage(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR)
+ + " (" + pack + " package)");
}
if (!moveRemoveScript(tempDir, pack)) {
return executeScript(scriptFile);
} catch (IMShellCommandFail e) {
Log.ExceptionLog(e);
- throw new IMFatalException(
- ErrorCode.INSTALL_SCRIPT_FATAL_ERROR);
+ throw new IMFatalException(ErrorController.getMessage(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR)
+ + " (" + pack + " package)");
}
} else {
Log.log(pack.getPackageName() + " does not have install script");
}
} catch (IMShellCommandFail e) {
Log.ExceptionLog(e);
- throw new IMFatalException(ErrorCode.REMOVE_SCRIPT_FATAL_ERROR + " (" + pkg + ")");
+ throw new IMFatalException(ErrorController.getMessage(ErrorCode.REMOVE_SCRIPT_FATAL_ERROR)
+ + " (" + pkg + " package)");
}
}
return 2; // package does not need remove script.
Log.err("Installer.executeScript() install script error => "
+ scriptFile.getAbsolutePath());
Log.err("Exit code => " + Integer.toString(exitCode));
- throw new IMFatalException(ErrorCode.SCRIPT_FATAL_ERROR + " (" + scriptFile.getParent() + ")");
+ throw new IMFatalException(ErrorController.getMessage(ErrorCode.SCRIPT_FATAL_ERROR)
+ + " (" + scriptFile.getParentFile().getName() + " package)");
}
}
}