throw new RecoverableException( e.getMessage(), e );
private void processEndOfQueue(List<FkSecondPass> endOfQueueFkSecondPasses) { /* * If a second pass raises a recoverableException, queue it for next round * stop of no pass has to be processed or if the number of pass to processes * does not diminish between two rounds. * If some failing pass remain, raise the original exception */ boolean stopProcess = false; RuntimeException originalException = null; while ( !stopProcess ) { List<FkSecondPass> failingSecondPasses = new ArrayList<>(); for ( FkSecondPass pass : endOfQueueFkSecondPasses ) { try { pass.doSecondPass( getEntityBindingMap() ); } catch (RecoverableException e) { failingSecondPasses.add( pass ); if ( originalException == null ) { originalException = (RuntimeException) e.getCause(); } } } stopProcess = failingSecondPasses.size() == 0 || failingSecondPasses.size() == endOfQueueFkSecondPasses.size(); endOfQueueFkSecondPasses = failingSecondPasses; } if ( endOfQueueFkSecondPasses.size() > 0 ) { throw originalException; } }
failingSecondPasses.add( pass ); if ( originalException == null ) { originalException = ( RuntimeException ) e.getCause();
throw ( RuntimeException ) e.getCause();
private void processEndOfQueue(List<FkSecondPass> endOfQueueFkSecondPasses) { /* * If a second pass raises a recoverableException, queue it for next round * stop of no pass has to be processed or if the number of pass to processes * does not diminish between two rounds. * If some failing pass remain, raise the original exception */ boolean stopProcess = false; RuntimeException originalException = null; while ( !stopProcess ) { List<FkSecondPass> failingSecondPasses = new ArrayList<FkSecondPass>(); for ( FkSecondPass pass : endOfQueueFkSecondPasses ) { try { pass.doSecondPass( classes ); } catch (RecoverableException e) { failingSecondPasses.add( pass ); if ( originalException == null ) { originalException = (RuntimeException) e.getCause(); } } } stopProcess = failingSecondPasses.size() == 0 || failingSecondPasses.size() == endOfQueueFkSecondPasses.size(); endOfQueueFkSecondPasses = failingSecondPasses; } if ( endOfQueueFkSecondPasses.size() > 0 ) { throw originalException; } }
private void processEndOfQueue(List<FkSecondPass> endOfQueueFkSecondPasses) { /* * If a second pass raises a recoverableException, queue it for next round * stop of no pass has to be processed or if the number of pass to processes * does not diminish between two rounds. * If some failing pass remain, raise the original exception */ boolean stopProcess = false; RuntimeException originalException = null; while ( !stopProcess ) { List<FkSecondPass> failingSecondPasses = new ArrayList<FkSecondPass>(); for ( FkSecondPass pass : endOfQueueFkSecondPasses ) { try { pass.doSecondPass( classes ); } catch (RecoverableException e) { failingSecondPasses.add( pass ); if ( originalException == null ) { originalException = (RuntimeException) e.getCause(); } } } stopProcess = failingSecondPasses.size() == 0 || failingSecondPasses.size() == endOfQueueFkSecondPasses.size(); endOfQueueFkSecondPasses = failingSecondPasses; } if ( endOfQueueFkSecondPasses.size() > 0 ) { throw originalException; } }
throw new RecoverableException( e.getMessage(), e );
private void processEndOfQueue(List<FkSecondPass> endOfQueueFkSecondPasses) { /* * If a second pass raises a recoverableException, queue it for next round * stop of no pass has to be processed or if the number of pass to processes * does not diminish between two rounds. * If some failing pass remain, raise the original exception */ boolean stopProcess = false; RuntimeException originalException = null; while ( !stopProcess ) { List<FkSecondPass> failingSecondPasses = new ArrayList<>(); for ( FkSecondPass pass : endOfQueueFkSecondPasses ) { try { pass.doSecondPass( getEntityBindingMap() ); } catch (RecoverableException e) { failingSecondPasses.add( pass ); if ( originalException == null ) { originalException = (RuntimeException) e.getCause(); } } } stopProcess = failingSecondPasses.size() == 0 || failingSecondPasses.size() == endOfQueueFkSecondPasses.size(); endOfQueueFkSecondPasses = failingSecondPasses; } if ( endOfQueueFkSecondPasses.size() > 0 ) { throw originalException; } }
throw ( RuntimeException ) e.getCause();
throw ( RuntimeException ) e.getCause();