tags:

views:

107

answers:

1

ErrorDialog.openError takes arguments for dialog title, message, and status (which has a message itself).

I want to show the exception's message in the main area, and the call stack in the details area. However, both of these variations show the call stack in the main area:

void showException(Throwable e) {
    Status status = 
        new Status(IStatus.ERROR, "SCS Admin", e.getLocalizedMessage(), e);
    e.printStackTrace;
    ErrorDialog.openError(getShell(), null, Util.getStackTrace(e), status);
}

void showException(Throwable e) {
    Status status = 
        new Status(IStatus.ERROR, "SCS Admin", Util.getStackTrace(e), e);
    e.printStackTrace;
    ErrorDialog.openError(getShell(), null, e.getLocalizedMessage(), status);
}

How can I switch it around?