168169170171172173174175
@Override public GerritConfig get() { try { return create(); } catch (MalformedURLException e) { throw new ProvisionException("Cannot create GerritConfig instance", e); } }
2728293031323334353637
if (!b) field.setAccessible(true); field.set(injectee, LoggerFactory.getLogger(type.getRawType())); if (!b) field.setAccessible(false); } catch (IllegalAccessException e) { throw new ProvisionException( "Unable to inject SLF4J logger", e); } } }); }
326327328329330331332
public void throwProvisionExceptionIfErrorsExist() { if (!hasErrors()) { return; } throw new ProvisionException(getMessages()); }
116117118119120121122123
dbi.registerMapper(resultSetMapper); } return dbi; } catch (ClassNotFoundException e) { throw new ProvisionException("while instantiating DBI", e); } }
5859606162636465
//Feed the empty properties to get the code work JndiBindings.bindInjectorAndBindings(context, injector, new Properties()); } return context; } catch (Exception e) { throw new ProvisionException("Failed to create JNDI bindings. Reason: " + e, e); } }
7980818283848586878889
if (routeBuilders != null) { for (RoutesBuilder builder : routeBuilders) { try { camelContext.addRoutes(builder); } catch (Exception e) { throw new ProvisionException("Failed to add the router. Reason: " + e, e); } } } updateRegistry(camelContext); return camelContext;
59606162636465666768
} T t; try { t = constructor.newInstance(params); } catch (Exception e) { throw new ProvisionException("Could not instantiate " + key + "", e); } injector.injectMembers(t); return postProcess(t); }
223224225226227228229230
{ return bindProperties( propertiesResource.toURL() ); } catch ( MalformedURLException e ) { throw new ProvisionException( format( "URI '%s' not supported: %s", propertiesResource, e.getMessage() ) ); } }
8182838485868788
public void afterInjection(I injectee) { try { field.setAccessible(true); field.set(injectee, logger); } catch (IllegalAccessException e) { throw new ProvisionException(e.getMessage(), e); } }
427428429430431432433