Revision 5076
Added by daigle over 14 years ago
DBAdmin.java | ||
---|---|---|
45 | 45 |
import java.util.TreeSet; |
46 | 46 |
import java.util.Vector; |
47 | 47 |
|
48 |
import javax.servlet.ServletException; |
|
49 | 48 |
import javax.servlet.http.HttpServletRequest; |
50 | 49 |
import javax.servlet.http.HttpServletResponse; |
51 | 50 |
import javax.servlet.http.HttpSession; |
... | ... | |
55 | 54 |
import edu.ucsb.nceas.metacat.database.DBConnectionPool; |
56 | 55 |
import edu.ucsb.nceas.metacat.database.DBVersion; |
57 | 56 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
57 |
import edu.ucsb.nceas.metacat.shared.MetacatUtilException; |
|
58 | 58 |
import edu.ucsb.nceas.metacat.util.DatabaseUtil; |
59 | 59 |
import edu.ucsb.nceas.metacat.util.RequestUtil; |
60 | 60 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
... | ... | |
182 | 182 |
} catch (GeneralPropertyException gpe) { |
183 | 183 |
throw new AdminException("DBAdmin.configureDatabase - Problem getting or " + |
184 | 184 |
"setting property while initializing system properties page: " + gpe.getMessage()); |
185 |
} catch (IOException ioe) { |
|
186 |
throw new AdminException("DBAdmin.configureDatabase - IO problem while initializing " |
|
187 |
+ "system properties page:" + ioe.getMessage()); |
|
188 |
} catch (ServletException se) { |
|
189 |
throw new AdminException("DBAdmin.configureDatabase - problem forwarding request while " |
|
190 |
+ "initializing system properties page: " + se.getMessage()); |
|
191 |
} |
|
185 |
} catch (MetacatUtilException mue) { |
|
186 |
throw new AdminException("DBAdmin.configureDatabase - utility problem while initializing " |
|
187 |
+ "system properties page:" + mue.getMessage()); |
|
188 |
} |
|
192 | 189 |
} else { |
193 | 190 |
// The configuration form is being submitted and needs to be |
194 | 191 |
// processed, setting the properties in the configuration file |
... | ... | |
228 | 225 |
} catch (GeneralPropertyException gpe) { |
229 | 226 |
throw new AdminException("DBAdmin.configureDatabase - Problem getting or setting " + |
230 | 227 |
"property while upgrading database: " + gpe.getMessage()); |
231 |
} catch (IOException ioe) { |
|
232 |
throw new AdminException("DBAdmin.configureDatabase - IO problem while upgrading database: " |
|
233 |
+ ioe.getMessage()); |
|
234 |
} catch (ServletException se) { |
|
235 |
throw new AdminException("DBAdmin.configureDatabase - problem forwarding request while " |
|
236 |
+ "upgrading database: " + se.getMessage()); |
|
237 |
} |
|
228 |
} catch (MetacatUtilException mue) { |
|
229 |
throw new AdminException("DBAdmin.configureDatabase - utility problem while upgrading database: " |
|
230 |
+ mue.getMessage()); |
|
231 |
} |
|
238 | 232 |
} |
239 | 233 |
} |
240 | 234 |
|
Also available in: Unified diff
Change RequestUtil forwardRequest() method to throw MetacatUtilException.