if (!executeInstallScript(pack, monitor, tempDir)) {
Log.err("Fail to execute install script.");
- throw new IMFatalException(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR);
+ throw new IMFatalException(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR + " (" + pack + ")");
}
if (!moveRemoveScript(tempDir, pack)) {
}
} catch (IMShellCommandFail e) {
Log.ExceptionLog(e);
- throw new IMFatalException(ErrorCode.REMOVE_SCRIPT_FATAL_ERROR);
+ throw new IMFatalException(ErrorCode.REMOVE_SCRIPT_FATAL_ERROR + " (" + pkg + ")");
}
}
return 2; // package does not need remove script.
// check exit code
if (exitCode == 0) {
return true;
- } else if (exitCode == 1) {
- Log.err("Exit code => " + Integer.toString(exitCode));
- return false;
- } else if (exitCode == 2) {
+ } else if (exitCode == 1 || exitCode == 2) {
Log.err("Exit code => " + Integer.toString(exitCode));
return false;
} else if (exitCode == 99) {
Log.err("Installer.executeScript() install script error => "
+ scriptFile.getAbsolutePath());
Log.err("Exit code => " + Integer.toString(exitCode));
- throw new IMFatalException(ErrorCode.SCRIPT_FATAL_ERROR);
+ throw new IMFatalException(ErrorCode.SCRIPT_FATAL_ERROR + " (" + scriptFile.getParent() + ")");
}
}
}
OLD_TIZEN_SDK_EXISTS("Old Tizen SDK is installed. Remove the old SDK and run the Tizen SDK Install Manager again."),
UNSUPPORTED_PLATFORM("Platform not supported."),
REMOVE_SCRIPT_NOT_EXISTS("Removal script not found."),
- REMOVE_SCRIPT_FATAL_ERROR("Fatal error occurred while uninstalling the Tizen SDK."),
+ REMOVE_SCRIPT_FATAL_ERROR("Fatal error occurred while executing remove script."),
INSTALLATION_FAIL("Installation failed."),
INSTALL_CANCELED("Installation canceled."),
INSTALLED_VERSION_IS_HIGH("Installation progress failed due to high installed package version."),
PACKAGE_WRONG_CHECKSUM("Package file checksum error."),
PACKAGE_NOT_EXIST_TO_INSTALL_OR_UNINSTALL("Install or uninstall package not found."),
INSTALL_SCRIPT_NOT_EXISTS("Install script files not found."),
- INSTALL_SCRIPT_FATAL_ERROR("Fatal error occurred while installing the Tizen SDK."),
+ INSTALL_SCRIPT_FATAL_ERROR("Fatal error occurred while executing install script."),
SCRIPT_FATAL_ERROR("Fatal error occurred while executing post script."),
// Network error