ErrorDialog.openError
接受对话框标题、消息和状态(本身有消息)的参数。
我想在主区域显示异常的消息,在细节区域显示调用堆栈。但是,这两种变体都在主要区域中显示了调用堆栈:
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);
}
我该如何切换它?