Bug 80608 SWT.error does not initialize the causing exception.
SWTException stores the "cause" exception in a public field named "throwable". This prevents access to the causing exception in a standard way, the Exception.getCause method. SWT.error should call initCause to set this up.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/InternalErrorDialog.java
import java.io.IOException;
import java.io.PrintStream;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
/**
 * Added a Details button to the MessageDialog to show the exception
 * stack trace.
 */
public class InternalErrorDialog extends MessageDialog {
    private Throwable detail;
    private int detailButtonID = -1;
    private Text text;
     
    
    private int defaultButtonIndex = 0;
    /**
     * Size of the text in lines.
     */
    private static final int TEXT_LINE_COUNT = 15;
    public InternalErrorDialog(Shell parentShell, String dialogTitle,