}
public void setException(Object obj, Exception exp) {
if(exp == null) return;
if(print) exp.printStackTrace();
writer.put(new TraceObject(null, exp, null));
if(obj == null || exp instanceof NullPointerException) return;
Shell shell = (Shell) obj;
MessageBox messageBox = new MessageBox(shell, SWT.OK);
if(exp.getMessage() != null) {
messageBox.setMessage(exp.getMessage());