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:
thatsIch
2015-03-23 10:14:35 +01:00
parent 817163dbf6
commit 3783ae8619
76 changed files with 288 additions and 290 deletions
@@ -46,7 +46,7 @@ public class InvTweaks extends BaseModule implements IInvTweaks
public void postInit()
{
if( api == null )
throw new RuntimeException( "InvTweaks API Instance Failed." );
throw new IllegalStateException( "InvTweaks API Instance Failed." );
}
@Override
@@ -146,7 +146,7 @@ public class NEI extends BaseModule implements INEI, IContainerTooltipHandler
}
catch( Throwable t )
{
throw new RuntimeException( "Invalid version of NEI, please update", t );
throw new IllegalStateException( "Invalid version of NEI, please update", t );
}
}
@@ -187,9 +187,13 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
{
return this.getClass().newInstance();
}
catch( Exception e )
catch( InstantiationException e )
{
throw new RuntimeException( e );
throw new IllegalStateException( e );
}
catch( IllegalAccessException e )
{
throw new IllegalStateException( e );
}
}