Throws an appropriate exception based on the passed in error code.
The <code>throwable</code> argument should be either null, or the
throwable which caused SWT to throw an exception.
<p>
In SWT, errors are reported by throwing one of three exceptions:
<dl>
<dd>java.lang.IllegalArgumentException</dd>
<dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
<dd>org.eclipse.swt.SWTException (extends java.lang.RuntimeException)</dd>
<dt>thrown whenever a recoverable error happens internally in SWT</dt>
<dd>org.eclipse.swt.SWTError (extends java.lang.Error)</dd>
<dt>thrown whenever a <b>non-recoverable</b> error happens internally in SWT</dt>
</dl>
This method provides the logic which maps between error codes
and one of the above exceptions.
</p>
@param code the SWT error code.
@param throwable the exception which caused the error to occur.
@param detail more information about error.
Throws an appropriate exception based on the passed in error code. The <code>throwable</code> argument should be either null, or the throwable which caused SWT to throw an exception. <p> In SWT, errors are reported by throwing one of three exceptions: <dl> <dd>java.lang.IllegalArgumentException</dd> <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt> <dd>org.eclipse.swt.SWTException (extends java.lang.RuntimeException)</dd> <dt>thrown whenever a recoverable error happens internally in SWT</dt> <dd>org.eclipse.swt.SWTError (extends java.lang.Error)</dd> <dt>thrown whenever a <b>non-recoverable</b> error happens internally in SWT</dt> </dl> This method provides the logic which maps between error codes and one of the above exceptions. </p>
@param code the SWT error code. @param throwable the exception which caused the error to occur. @param detail more information about error.
@see SWTError @see SWTException @see IllegalArgumentException
@since 3.0