tx-control/tx-control-api/src/main/java/org/osgi/service/transaction/control/ScopedWorkException.java
public <A extends Throwable, B extends Throwable, C extends Throwable> RuntimeException asOneOf(
			Class<A> a, Class<B> b, Class<C> c) throws A, B, C {
		Throwable t = getCause();

		if (t instanceof RuntimeException) {
			throw (RuntimeException) t;
		}

		possibleThrow(a, t);
		possibleThrow(b, t);
		possibleThrow(c, t);

		throw new IllegalArgumentException(
				"The cause of this Exception is not an instance of " + String
						.join(", ", a.getName(), b.getName(), c.getName()),
				this);
	}
/**
	 * Throws the cause of this Exception as a RuntimeException or one of the
	 * supplied Exception types.
	 * 
	 * @see #asOneOf(Class, Class)
	 * @param a
	 * @param b
	 * @param c
	 * @return This method will always throw an exception
	 * @throws A
	 * @throws B
	 */
Throws the cause of this Exception as a RuntimeException or one of the
supplied Exception types.


Throws the cause of this Exception as a RuntimeException or one of the supplied Exception types .
public <A extends Throwable, B extends Throwable, C extends Throwable> RuntimeException asOneOf(
			Class<A> a, Class<B> b, Class<C> c) throws A, B, C {
		Throwable t = getCause();
		if (t instanceof RuntimeException) {
			throw (RuntimeException) t;
		}
		possibleThrow(a, t);
		possibleThrow(b, t);
		possibleThrow(c, t);
		throw new IllegalArgumentException(
				"The cause of this Exception is not an instance of " + String
						.join(", ", a.getName(), b.getName(), c.getName()),
				this);
	}
public < A extends Throwable , B extends Throwable , C extends Throwable > RuntimeException asOneOf ( Class < A > a , Class < B > b , Class < C > c ) throws A , B , C { Throwable t = getCause ( ) ; if ( t instanceof RuntimeException ) { throw ( RuntimeException ) t ; } possibleThrow ( a , t ) ; possibleThrow ( b , t ) ; possibleThrow ( c , t ) ; throw new IllegalArgumentException ( "The cause of this Exception is not an instance of " + String . join ( ", " , a . getName ( ) , b . getName ( ) , c . getName ( ) ) , this ) ; }
Throws the cause of this Exception as a RuntimeException or one of the
 supplied Exception types.
Throws the cause of this Exception as a RuntimeException or one of the supplied Exception types .