Throwing functions let VM errors pass through

VM errors ought to be rethrown without being wrapped inside a
FunctionException.
This commit is contained in:
Emmanuel BENOîT 2015-09-17 09:42:23 +02:00
parent dfac1d4b0f
commit 34b97af161
59 changed files with 59 additions and 59 deletions

View file

@ -32,7 +32,7 @@ public interface ThrowingBiConsumer< T , U >
{
try {
this.throwingAccept( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingBiFunction< T , U , R >
{
try {
return this.throwingApply( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingBiPredicate< T , U >
{
try {
return this.throwingTest( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -31,7 +31,7 @@ public interface ThrowingBinaryOperator< T >
{
try {
return this.throwingApply( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingBooleanSupplier
{
try {
return this.throwingGetAsBoolean( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingConsumer< T >
{
try {
this.throwingAccept( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingDoubleBinaryOperator
{
try {
return this.throwingApplyAsDouble( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -29,7 +29,7 @@ public interface ThrowingDoubleConsumer
{
try {
this.throwingAccept( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingDoubleFunction< R >
{
try {
return this.throwingApply( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingDoublePredicate
{
try {
return this.throwingTest( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingDoubleSupplier
{
try {
return this.throwingGetAsDouble( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingDoubleToFloatFunction
{
try {
return this.throwingApplyAsFloat( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingDoubleToIntFunction
{
try {
return this.throwingApplyAsInt( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingDoubleToLongFunction
{
try {
return this.throwingApplyAsLong( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingDoubleUnaryOperator
{
try {
return this.throwingApplyAsDouble( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingFloatBinaryOperator
{
try {
return this.throwingApplyAsFloat( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -25,7 +25,7 @@ public interface ThrowingFloatConsumer
{
try {
this.throwingAccept( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingFloatFunction< R >
{
try {
return this.throwingApply( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingFloatPredicate
{
try {
return this.throwingTest( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -24,7 +24,7 @@ public interface ThrowingFloatSupplier
{
try {
return this.throwingGetAsFloat( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingFloatToDoubleFunction
{
try {
return this.throwingApplyAsDouble( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingFloatToIntFunction
{
try {
return this.throwingApplyAsInt( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingFloatToLongFunction
{
try {
return this.throwingApplyAsLong( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingFloatUnaryOperator
{
try {
return this.throwingApplyAsFloat( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingFunction< T , R >
{
try {
return this.throwingApply( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingIntBinaryOperator
{
try {
return this.throwingApplyAsInt( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -29,7 +29,7 @@ public interface ThrowingIntConsumer
{
try {
this.throwingAccept( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingIntFunction< R >
{
try {
return this.throwingApply( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingIntPredicate
{
try {
return this.throwingTest( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingIntSupplier
{
try {
return this.throwingGetAsInt( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingIntToDoubleFunction
{
try {
return this.throwingApplyAsDouble( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingIntToFloatFunction
{
try {
return this.throwingApplyAsFloat( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingIntToLongFunction
{
try {
return this.throwingApplyAsLong( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingIntUnaryOperator
{
try {
return this.throwingApplyAsInt( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingLongBinaryOperator
{
try {
return this.throwingApplyAsLong( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -29,7 +29,7 @@ public interface ThrowingLongConsumer
{
try {
this.throwingAccept( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingLongFunction< R >
{
try {
return this.throwingApply( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingLongPredicate
{
try {
return this.throwingTest( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingLongSupplier
{
try {
return this.throwingGetAsLong( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingLongToDoubleFunction
{
try {
return this.throwingApplyAsDouble( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingLongToFloatFunction
{
try {
return this.throwingApplyAsFloat( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingLongToIntFunction
{
try {
return this.throwingApplyAsInt( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingLongUnaryOperator
{
try {
return this.throwingApplyAsLong( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingObjDoubleConsumer< T >
{
try {
this.throwingAccept( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingObjFloatConsumer< T >
{
try {
this.throwingAccept( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingObjIntConsumer< T >
{
try {
this.throwingAccept( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingObjLongConsumer< T >
{
try {
this.throwingAccept( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingPredicate< T >
{
try {
return this.throwingTest( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -23,7 +23,7 @@ public interface ThrowingRunnable
{
try {
this.throwingRun( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingSupplier< T >
{
try {
return this.throwingGet( );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingToDoubleBiFunction< T , U >
{
try {
return this.throwingApplyAsDouble( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingToDoubleFunction< T >
{
try {
return this.throwingApplyAsDouble( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -28,7 +28,7 @@ public interface ThrowingToFloatBiFunction< T , U >
{
try {
return this.throwingApplyAsFloat( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -26,7 +26,7 @@ public interface ThrowingToFloatFunction< T >
{
try {
return this.throwingApplyAsFloat( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingToIntBiFunction< T , U >
{
try {
return this.throwingApplyAsInt( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingToIntFunction< T >
{
try {
return this.throwingApplyAsInt( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -32,7 +32,7 @@ public interface ThrowingToLongBiFunction< T , U >
{
try {
return this.throwingApplyAsLong( t , u );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingToLongFunction< T >
{
try {
return this.throwingApplyAsLong( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );

View file

@ -30,7 +30,7 @@ public interface ThrowingUnaryOperator< T >
{
try {
return this.throwingApply( t );
} catch ( final RuntimeException e ) {
} catch ( final Error | RuntimeException e ) {
throw e;
} catch ( final Throwable e ) {
throw new FunctionException( e );