private Class<?> loadClass(Descriptor descriptor, Injectee injectee) { if (descriptor == null) throw new IllegalArgumentException(); HK2Loader loader = descriptor.getLoader(); if (loader == null) { return Utilities.loadClass(descriptor.getImplementation(), injectee); } Class<?> retVal; try { retVal = loader.loadClass(descriptor.getImplementation()); } catch (MultiException me) { me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } catch (Throwable th) { MultiException me = new MultiException(th); me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } return retVal; }
private Class<?> loadClass(Descriptor descriptor, Injectee injectee) { if (descriptor == null) throw new IllegalArgumentException(); HK2Loader loader = descriptor.getLoader(); if (loader == null) { return Utilities.loadClass(descriptor.getImplementation(), injectee); } Class<?> retVal; try { retVal = loader.loadClass(descriptor.getImplementation()); } catch (MultiException me) { me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } catch (Throwable th) { MultiException me = new MultiException(th); me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } return retVal; }
private Class<?> loadClass(Descriptor descriptor, Injectee injectee) { if (descriptor == null) throw new IllegalArgumentException(); HK2Loader loader = descriptor.getLoader(); if (loader == null) { return Utilities.loadClass(descriptor.getImplementation(), injectee); } Class<?> retVal; try { retVal = loader.loadClass(descriptor.getImplementation()); } catch (MultiException me) { me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } catch (Throwable th) { MultiException me = new MultiException(th); me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } return retVal; }
private Class<?> loadClass(Descriptor descriptor, Injectee injectee) { if (descriptor == null) throw new IllegalArgumentException(); HK2Loader loader = descriptor.getLoader(); if (loader == null) { return Utilities.loadClass(descriptor.getImplementation(), injectee); } Class<?> retVal; try { retVal = loader.loadClass(descriptor.getImplementation()); } catch (MultiException me) { me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } catch (Throwable th) { MultiException me = new MultiException(th); me.addError(new IllegalStateException("Could not load descriptor " + descriptor)); throw me; } return retVal; }
private void fail(Throwable th, Descriptor descriptor) { synchronized (lock) { if (hardCancelled) return; ErrorInformation info = invokeOnError(currentTaskFuture, th, ErrorInformation.ErrorAction.GO_TO_NEXT_LOWER_LEVEL_AND_STOP, listeners, descriptor); if (ErrorInformation.ErrorAction.IGNORE.equals(info.getAction())) return; if (accumulatedExceptions == null) { accumulatedExceptions = new MultiException(); } accumulatedExceptions.addError(th); } }
/* package */ void rollbackCurrentDatabase(WriteableBeanDatabaseImpl writeableDatabase, Object commitMessage, List<Change> changes, LinkedList<BeanDatabaseUpdateListener> completedListeners) { synchronized (lock) { inTransaction--; if (inTransaction < 0) inTransaction = 0; List<BeanDatabaseUpdateListener> completed = completedListeners; completedListeners = null; if (completed == null) completed = Collections.emptyList(); MultiException rollbackError = null; for (BeanDatabaseUpdateListener completedListener : completed) { try { completedListener.rollbackDatabaseChange(currentDatabase, writeableDatabase, commitMessage, changes); } catch (Throwable th) { if (rollbackError == null) { rollbackError = new MultiException(new RollbackFailedException(th)); } else { rollbackError.addError(new RollbackFailedException(th)); } } } if (rollbackError != null) throw rollbackError; } }
commitError.addError(new CommitFailedException(th));
throwMe.addError(new RollbackFailedException(rollTh));