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:
@@ -598,7 +598,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
changed = true;
|
||||
ItemStack issue = adaptor.addItems( acquired.getItemStack() );
|
||||
if( issue != null )
|
||||
throw new RuntimeException( "bad attempt at managing inventory. ( addItems )" );
|
||||
throw new IllegalStateException( "bad attempt at managing inventory. ( addItems )" );
|
||||
}
|
||||
else
|
||||
changed = this.handleCrafting( x, adaptor, itemStack ) || changed;
|
||||
@@ -629,9 +629,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
changed = true;
|
||||
ItemStack removed = adaptor.removeItems( (int) diff, null, null );
|
||||
if( removed == null )
|
||||
throw new RuntimeException( "bad attempt at managing inventory. ( removeItems )" );
|
||||
throw new IllegalStateException( "bad attempt at managing inventory. ( removeItems )" );
|
||||
else if( removed.stackSize != diff )
|
||||
throw new RuntimeException( "bad attempt at managing inventory. ( removeItems )" );
|
||||
throw new IllegalStateException( "bad attempt at managing inventory. ( removeItems )" );
|
||||
}
|
||||
}
|
||||
// else wtf?
|
||||
|
||||
Reference in New Issue
Block a user