Improved exceptions
Many exceptions got an improvement due to changed class or description or details it is providing. Is not complete, needs to be done in patches in the regions, where it is needed, since some are just swallowed. Removed total usage of pure RuntimeExceptions to 0.
This commit is contained in:
@@ -24,6 +24,7 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
@@ -60,15 +61,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
this.myHash = is.myHash;
|
||||
}
|
||||
|
||||
private AEFluidStack( FluidStack is )
|
||||
private AEFluidStack( @Nonnull FluidStack is )
|
||||
{
|
||||
if( is == null )
|
||||
throw new RuntimeException( "Invalid Itemstack." );
|
||||
|
||||
this.fluid = is.getFluid();
|
||||
|
||||
if( this.fluid == null )
|
||||
throw new RuntimeException( "Fluid is null." );
|
||||
throw new IllegalArgumentException( "Fluid is null." );
|
||||
|
||||
this.stackSize = is.amount;
|
||||
this.setCraftable( false );
|
||||
|
||||
Reference in New Issue
Block a user