cpw.mods.fml.client
Class CustomModLoadingErrorDisplayException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by cpw.mods.fml.client.CustomModLoadingErrorDisplayException
All Implemented Interfaces:
IFMLHandledException, Serializable

public abstract class CustomModLoadingErrorDisplayException
extends RuntimeException
implements IFMLHandledException

If a mod throws this exception during loading, it will be called back to render the error screen through the methods below. This error will not be cleared, and will not allow the game to carry on, but might be useful if your mod wishes to report a fatal configuration error in a pretty way. Throw this through a proxy. It won't work on the dedicated server environment.

Author:
cpw
See Also:
Serialized Form

Constructor Summary
CustomModLoadingErrorDisplayException()
           
 
Method Summary
abstract  void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime)
          Draw your error to the screen.
abstract  void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer)
          Called after the GUI is inited by the parent code.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomModLoadingErrorDisplayException

public CustomModLoadingErrorDisplayException()
Method Detail

initGui

public abstract void initGui(GuiErrorScreen errorScreen,
                             FontRenderer fontRenderer)
Called after the GUI is inited by the parent code. You can do extra stuff here, maybe?

Parameters:
errorScreen - The error screen we're painting
fontRenderer - A font renderer for you

drawScreen

public abstract void drawScreen(GuiErrorScreen errorScreen,
                                FontRenderer fontRenderer,
                                int mouseRelX,
                                int mouseRelY,
                                float tickTime)
Draw your error to the screen.
Warning: Minecraft is in a deep error state. All it can do is stop. Do not try and do anything involving complex user interaction here.

Parameters:
errorScreen - The error screen to draw to
fontRenderer - A font renderer for you
mouseRelX - Mouse X
mouseRelY - Mouse Y
tickTime - tick time