org.neo4j.helpers.collection
Class ExceptionHandlingIterable<T>
java.lang.Object
org.neo4j.helpers.collection.ExceptionHandlingIterable<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Iterable<T>
public class ExceptionHandlingIterable<T>
- extends Object
- implements Iterable<T>
allows to catch, analyse and react on exceptions that are thrown by the inner iterable
useful for exception conversion on iterator methods
Uses sun.misc.Unsafe internally to rethrow original exceptions !
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionHandlingIterable
public ExceptionHandlingIterable(Iterable<T> source)
getUnsafe
public static sun.misc.Unsafe getUnsafe()
iterator
public Iterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
rethrow
protected void rethrow(Throwable t)
exceptionOnHasNext
protected boolean exceptionOnHasNext(Throwable t)
exceptionOnRemove
protected void exceptionOnRemove(Throwable t)
exceptionOnNext
protected T exceptionOnNext(Throwable t)
exceptionOnIterator
protected Iterator<T> exceptionOnIterator(Throwable t)
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.