package dwarf;

/**
 * An <code>DwarfError</code> is a subclass of <code>DwarfException</code> that
 * indicates serious problems that a reasonable application should not try to
 * catch. When a <code>DwarfError</code> is created the <code>Engine</code> is
 * destroyed.
 *
 * @author Matthew 'siD' Van der Bijl
 *
 * @see java.lang.Exception
 * @see dwarf.DwarfException
 * @see dwarf.engine.core.Engine#dispose()
 */
@SuppressWarnings("serial")
public class DwarfError extends dwarf.DwarfException {

    /**
     * Default constructor. Creates a new instance of <code>DwarfError</code>
     * without detail message. Will "destroy" the <code>Engine</code>.
     *
     * @see dwarf.engine.core.Engine#dispose()
     */
    public DwarfError() {
        super();
        super.display();
        dwarf.engine.core.Engine.dispose();
    }

    /**
     * Constructs an instance of <code>DwarfError</code> with the specified
     * detail message (msg). Will "destroy" the <code>Engine</code>.
     *
     * @see dwarf.engine.core.Engine#dispose()
     *
     * @param msg the detail message.
     */
    public DwarfError(String msg) {
        super(msg);
        super.display();
        dwarf.engine.core.Engine.dispose();
    }

    /**
     * Constructs an instance of <code>DwarfError</code> with the specified
     * detail message (msg) and cause. Will "destroy" the <code>Engine</code>.
     *
     * @see dwarf.engine.core.Engine#dispose()
     *
     * @param msg String identifier for exception
     * @param cause the cause of the error
     */
    public DwarfError(String msg, Throwable cause) {
        super(msg, cause);
        super.display();
        dwarf.engine.core.Engine.dispose();
    }

    /**
     * Constructs an instance of <code>DwarfError</code> with the specified
     * cause. Will "destroy" the <code>Engine</code>.
     *
     * @see dwarf.engine.core.Engine#dispose()
     *
     * @param cause the cause of the error
     */
    public DwarfError(Throwable cause) {
        super(cause);
        super.display();
        dwarf.engine.core.Engine.dispose();
    }

    /**
     * Constructs a new <code>DwarfError</code> with the specified detail
     * message (msg), cause, suppression enabled or disabled, and writable stack
     * trace enabled or disabled. Will "destroy" the <code>Engine</code>.
     *
     * @see dwarf.engine.core.Engine#dispose()
     *
     * @param msg the detail message.
     * @param cause the cause. (A <code>null</code> value is permitted, and
     * indicates that the cause is nonexistent or unknown.)
     * @param enableSuppression whether or not suppression is enabled or
     * disabled
     * @param writableStackTrace whether or not the stack trace should be
     * writable
     */
    public DwarfError(String msg, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(msg, cause, enableSuppression, writableStackTrace);
        super.display();
        dwarf.engine.core.Engine.dispose();
    }

    /**
     * Constructs an instance of <code>DwarfException</code> with the specified
     * exception. Will "destroy" the <code>Engine</code>.
     *
     * @see dwarf.engine.core.Engine#dispose()
     *
     * @param exception the specified Exception
     */
    public DwarfError(Exception exception) {
        super(exception.getMessage(), exception.getCause());
        super.display();
        dwarf.engine.core.Engine.dispose();
    }

    @Override
    public DwarfError clone() throws CloneNotSupportedException {
        return new DwarfError(this);
    }

    @Override
    public DwarfError get() {
        return this;
    }
}

@@ -344,36 +344,59 @@
  * @see 
-dwarf.DwarfException
+java.lang.Error%0A * %0A * @see dwarf.Crashform
 %0A * @see
@@ -499,28 +499,48 @@
 nds 
-dwarf.DwarfException
+java.lang.Exception implements Cloneable
  %7B%0A%0A
@@ -805,77 +805,8 @@
 ();%0A
-        super.display();%0A        dwarf.engine.core.Engine.dispose();%0A
     
@@ -1128,77 +1128,8 @@
 g);%0A
-        super.display();%0A        dwarf.engine.core.Engine.dispose();%0A
     
@@ -1540,77 +1540,8 @@
 e);%0A
-        super.display();%0A        dwarf.engine.core.Engine.dispose();%0A
     
@@ -1860,77 +1860,8 @@
 e);%0A
-        super.display();%0A        dwarf.engine.core.Engine.dispose();%0A
     
@@ -2700,77 +2700,8 @@
 e);%0A
-        super.display();%0A        dwarf.engine.core.Engine.dispose();%0A
     
@@ -3076,77 +3076,8 @@
 ));%0A
-        super.display();%0A        dwarf.engine.core.Engine.dispose();%0A
     
@@ -3243,24 +3243,24 @@
 ror get() %7B%0A
-
         retu
@@ -3274,10 +3274,517 @@
 ;%0A    %7D%0A
+    %0A    public void destroyEngine() %7B%0A        dwarf.engine.core.Engine.dispose();%0A    %7D%0A    %0A    public java.lang.Exception toException() %7B%0A        return new Exception(this.getMessage(), this.getCause());%0A    %7D%0A    %0A    public org.lwjgl.LWJGLException toLWJGLException() %7B%0A        return new org.lwjgl.LWJGLException(this.getMessage(), this.getCause());%0A    %7D%0A    %0A    public void print() %7B%0A        System.err.println(this);%0A    %7D%0A    %0A    public void display() %7B%0A        new dwarf.Crashform(this);%0A    %7D%0A
 %7D%0A

Update DwarfError.java