- MasterkeyConfiguration mkConfigContext =\r
- MasterkeyConfiguration.getInstance(servletContext,\r
- "pazpar-application-jsf", ((HttpServletRequest) externalContext.getRequest()).getServerName());\r
- configFilePathAndName = mkConfigContext.getConfigFileLocation().getConfigFilePath();\r
- ModuleConfiguration moduleConfig = mkConfigContext.getModuleConfiguration("pz2client");\r
- pz2config = new Pz2Config(moduleConfig);\r
- logger.info(document());\r
+ MasterkeyConfiguration mkConfigContext;\r
+ try {\r
+ mkConfigContext = MasterkeyConfiguration.getInstance(servletContext,\r
+ "pazpar-application-jsf", ((HttpServletRequest) externalContext.getRequest()).getServerName());\r
+ } catch (IOException e) {\r
+ throw new ConfigurationException("Pz2ConfigureByMk2Config could not configure Pazpar2 client using MasterKey configuration scheme: "+e.getMessage(),e);\r
+ }\r
+ configFilePathAndName = mkConfigContext.getConfigFileLocation().getConfigFilePath(); \r
+ try {\r
+ ModuleConfiguration moduleConfig = mkConfigContext.getModuleConfiguration("pz2client");\r
+ pz2config = new Pz2Config(moduleConfig);\r
+ logger.info(document());\r
+ } catch (IOException e) {\r
+ throw new ConfigurationException("Pz2ConfigureByMk2Config could not get configuration for module 'pz2client': "+e.getMessage(),e);\r
+ } \r