From 3836edc9d733cd16523b08ab495f7ed6aee595e0 Mon Sep 17 00:00:00 2001 From: Juan Carlos Luciani Date: Mon, 19 Mar 2007 17:57:15 +0000 Subject: [PATCH] Fixed compilation errors. --- .../ClientKeystoreSetup/ClientKeystoreSetup.java | 8 ++++++-- .../package/windows/DeleteFile/DeleteFile.java | 11 +++++++++-- .../windows/InitConfigFile/InitConfigFile.java | 8 ++++++-- .../MungeCryptoPropertiesFilePath.java | 8 ++++++-- .../ServerKeystoreSetup/ServerKeystoreSetup.java | 10 +++++++--- .../SetupAsWindowsService/SetupAsWindowsService.java | 8 ++++++-- .../ShutdownWindowsService.java | 8 ++++++-- .../package/windows/UpdateWarFile/UpdateWarFile.java | 8 ++++++-- 8 files changed, 52 insertions(+), 17 deletions(-) diff --git a/CASA-auth-token/server-java/package/windows/ClientKeystoreSetup/ClientKeystoreSetup.java b/CASA-auth-token/server-java/package/windows/ClientKeystoreSetup/ClientKeystoreSetup.java index c6a9ef74..965cb280 100644 --- a/CASA-auth-token/server-java/package/windows/ClientKeystoreSetup/ClientKeystoreSetup.java +++ b/CASA-auth-token/server-java/package/windows/ClientKeystoreSetup/ClientKeystoreSetup.java @@ -41,6 +41,7 @@ public class ClientKeystoreSetup final static int ERROR_REQUIRED_VALUE_MISSING = -11; final static int ERROR_EXEC_INTERRUPTED = -12; final static int ERROR_IO_EXCEPTION = -13; + final static int ERROR_EXCEPTION = -14; final static String INSTALL_DIR = "installdir="; final static String PROPERTY_FILE = "propertyfile="; @@ -93,9 +94,9 @@ public class ClientKeystoreSetup //fw.close(); // DEBUG STUFF } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } } @@ -376,6 +377,9 @@ public class ClientKeystoreSetup case ERROR_IO_EXCEPTION: sMessage = "IOException "; break; + case ERROR_EXCEPTION: + sMessage = "Exception "; + break; default: sMessage = "Unknown error"; break; diff --git a/CASA-auth-token/server-java/package/windows/DeleteFile/DeleteFile.java b/CASA-auth-token/server-java/package/windows/DeleteFile/DeleteFile.java index a74316c8..cc3f1666 100644 --- a/CASA-auth-token/server-java/package/windows/DeleteFile/DeleteFile.java +++ b/CASA-auth-token/server-java/package/windows/DeleteFile/DeleteFile.java @@ -40,6 +40,7 @@ public class DeleteFile final static int ERROR_MISSING_FILE_PARAM = -7; final static int ERROR_FILTER_ON_NON_DIRECTORY = -8; final static int ERROR_BAD_PROPERTY_FILE_PARAM = -9;; + final static int ERROR_EXCEPTION = -10; final static String FILE_KEY = "file="; final static String FILTER_KEY = "filter="; @@ -73,9 +74,9 @@ public class DeleteFile } } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } finally { @@ -351,6 +352,12 @@ public class DeleteFile case ERROR_BAD_PROPERTY_FILE_PARAM: sMessage = "Bad property file parameter"; break; + case ERROR_IO_EXCEPTION: + sMessage = "IOException "; + break; + case ERROR_EXCEPTION: + sMessage = "Exception "; + break; default: sMessage = "Unknown error: " + err; break; diff --git a/CASA-auth-token/server-java/package/windows/InitConfigFile/InitConfigFile.java b/CASA-auth-token/server-java/package/windows/InitConfigFile/InitConfigFile.java index 8a828c0a..bd0c5b09 100644 --- a/CASA-auth-token/server-java/package/windows/InitConfigFile/InitConfigFile.java +++ b/CASA-auth-token/server-java/package/windows/InitConfigFile/InitConfigFile.java @@ -55,6 +55,7 @@ public class InitConfigFile final static int ERROR_UNABLE_TO_OPEN_TEMPLATE = -30; final static int ERROR_FILEWRITER_CREATE_FAILED = -31; final static int ERROR_BAD_ESCAPE_PATH_CHARS_PARAM = -32; + final static int ERROR_EXCEPTION = -33; final static String TEMPLATE_FILE_PARAM = "template="; final static String OUTPUT_FILE_PARAM = "output="; @@ -113,9 +114,9 @@ public class InitConfigFile } } } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } finally { @@ -516,6 +517,9 @@ public class InitConfigFile case ERROR_FILEWRITER_CREATE_FAILED: sMessage = "FileWriter create failed"; break; + case ERROR_EXCEPTION: + sMessage = "Exception "; + break; default: sMessage = "Unknown error: " + err; break; diff --git a/CASA-auth-token/server-java/package/windows/MungeCryptoPropertiesFilePath/MungeCryptoPropertiesFilePath.java b/CASA-auth-token/server-java/package/windows/MungeCryptoPropertiesFilePath/MungeCryptoPropertiesFilePath.java index cefc1cea..b033a746 100644 --- a/CASA-auth-token/server-java/package/windows/MungeCryptoPropertiesFilePath/MungeCryptoPropertiesFilePath.java +++ b/CASA-auth-token/server-java/package/windows/MungeCryptoPropertiesFilePath/MungeCryptoPropertiesFilePath.java @@ -41,6 +41,7 @@ public class MungeCryptoPropertiesFilePath final static int ERROR_MISSING_OUTPUT_FILE_PARAM = -8; final static int ERROR_CANNOT_READ_FILE = -9; final static int ERROR_CANNOT_CREATE_FILE = -10; + final static int ERROR_EXCEPTION = -11; final static String INPUT_FILE_PARAM = "input="; final static String OUTPUT_FILE_PARAM = "output="; @@ -85,9 +86,9 @@ public class MungeCryptoPropertiesFilePath rc = createOutputFile(); } } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } finally { @@ -304,6 +305,9 @@ public class MungeCryptoPropertiesFilePath case ERROR_CANNOT_CREATE_FILE: sMessage = "Cannot create file"; break; + case ERROR_EXCEPTION: + sMessage = "Exception"; + break; default: sMessage = "Unknown error: " + err; break; diff --git a/CASA-auth-token/server-java/package/windows/ServerKeystoreSetup/ServerKeystoreSetup.java b/CASA-auth-token/server-java/package/windows/ServerKeystoreSetup/ServerKeystoreSetup.java index 302efc36..06f80685 100644 --- a/CASA-auth-token/server-java/package/windows/ServerKeystoreSetup/ServerKeystoreSetup.java +++ b/CASA-auth-token/server-java/package/windows/ServerKeystoreSetup/ServerKeystoreSetup.java @@ -40,7 +40,8 @@ public class ServerKeystoreSetup final static int ERROR_MISSING_INSTALL_DIR_PARAM = -10; final static int ERROR_REQUIRED_VALUE_MISSING = -11; final static int ERROR_EXEC_INTERRUPTED = -12; - final static int ERROR_IO_EXCEPTION = -13; + final static int ERROR_IO_EXCEPTION = -13; + final static int ERROR_EXCEPTION = -14; final static String INSTALL_DIR = "installdir="; final static String PROPERTY_FILE = "propertyfile="; @@ -85,9 +86,9 @@ public class ServerKeystoreSetup //fw.close(); // DEBUG STUFF } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } } @@ -382,6 +383,9 @@ public class ServerKeystoreSetup case ERROR_IO_EXCEPTION: sMessage = "IO Exception "; break; + case ERROR_EXCEPTION: + sMessage = "Exception "; + break; default: sMessage = "Unknown error"; break; diff --git a/CASA-auth-token/server-java/package/windows/SetupAsWindowsService/SetupAsWindowsService.java b/CASA-auth-token/server-java/package/windows/SetupAsWindowsService/SetupAsWindowsService.java index 0b50f6c9..667aed3d 100644 --- a/CASA-auth-token/server-java/package/windows/SetupAsWindowsService/SetupAsWindowsService.java +++ b/CASA-auth-token/server-java/package/windows/SetupAsWindowsService/SetupAsWindowsService.java @@ -44,6 +44,7 @@ public class SetupAsWindowsService final static int ERROR_MISSING_INSTALL_DIR_PARAM = -23; final static int ERROR_MISSING_PROPERTY_FILE_PARAM = -24; final static int ERROR_BAD_PROPERTY_PARAM = -29; + final static int ERROR_EXCEPTION = -30; final static String INSTALL_DIR_PROPERTY = "ATS_INSTALL_DIR"; final static String PROPERTY_FILE_PARAM = "propertyfile="; @@ -94,9 +95,9 @@ public class SetupAsWindowsService } } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } finally { @@ -486,6 +487,9 @@ public class SetupAsWindowsService case ERROR_BAD_PROPERTY_PARAM: sMessage = "Bad property parameter"; break; + case ERROR_EXCEPTION: + sMessage = "Exception"; + break; default: sMessage = "Unknown error: " + err; break; diff --git a/CASA-auth-token/server-java/package/windows/ShutdownWindowsService/ShutdownWindowsService.java b/CASA-auth-token/server-java/package/windows/ShutdownWindowsService/ShutdownWindowsService.java index 0de7eff7..4f12a768 100644 --- a/CASA-auth-token/server-java/package/windows/ShutdownWindowsService/ShutdownWindowsService.java +++ b/CASA-auth-token/server-java/package/windows/ShutdownWindowsService/ShutdownWindowsService.java @@ -44,6 +44,7 @@ public class ShutdownWindowsService final static int ERROR_MISSING_INSTALL_DIR_PARAM = -23; final static int ERROR_MISSING_PROPERTY_FILE_PARAM = -24; final static int ERROR_BAD_PROPERTY_PARAM = -29; + final static int ERROR_EXCEPTION = -30; final static String INSTALL_DIR_PROPERTY = "ATS_INSTALL_DIR"; final static String PROPERTY_FILE_PARAM = "propertyfile="; @@ -91,9 +92,9 @@ public class ShutdownWindowsService } } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } finally { @@ -372,6 +373,9 @@ public class ShutdownWindowsService case ERROR_BAD_PROPERTY_PARAM: sMessage = "Bad property parameter"; break; + case ERROR_EXCEPTION: + sMessage = "Exception"; + break; default: sMessage = "Unknown error: " + err; break; diff --git a/CASA-auth-token/server-java/package/windows/UpdateWarFile/UpdateWarFile.java b/CASA-auth-token/server-java/package/windows/UpdateWarFile/UpdateWarFile.java index 64fd02f9..96a61c77 100644 --- a/CASA-auth-token/server-java/package/windows/UpdateWarFile/UpdateWarFile.java +++ b/CASA-auth-token/server-java/package/windows/UpdateWarFile/UpdateWarFile.java @@ -56,6 +56,7 @@ public class UpdateWarFile final static int ERROR_JOS_CLOSE_FAILED = -15; final static int ERROR_FOS_CLOSE_FAILED = -16; final static int ERROR_JFTEMPLATE_CLOSE_FAILED = -17; + final static int ERROR_EXCEPTION = -18; String sInstallDir; //File file; @@ -90,9 +91,9 @@ public class UpdateWarFile rc = createWarFile(); } } - catch (IOException e) + catch (Exception e) { - rc = ERROR_IO_EXCEPTION; + rc = ERROR_EXCEPTION; } finally { @@ -413,6 +414,9 @@ public class UpdateWarFile case ERROR_INVALID_NUMBER_OF_PARAMS: sMessage = "Invalid number of parameters: 1make expected"; break; + case ERROR_EXCEPTION: + sMessage = "Exception"; + break; default: sMessage = "Unknown error: " + err; break;