1 17 18 package org.sape.carbon.services.exception; 19 20 import org.sape.carbon.core.exception.DefaultExceptionDelegateImpl; 21 import org.sape.carbon.core.util.classify.SeverityEnum; 22 23 32 public class GUIExceptionDelegate extends DefaultExceptionDelegateImpl { 33 34 39 static ExceptionViewer exceptionViewer = null; 40 41 45 public GUIExceptionDelegate() { 46 47 } 48 49 50 53 public void handleException() { 54 if ((super.getSeverity() == SeverityEnum.FATAL) || 55 (super.getSeverity() == SeverityEnum.ERROR) || 56 (super.getSeverity() == SeverityEnum.WARN) || 57 (super.getSeverity() == SeverityEnum.INFO)){ 58 59 super.handleException(); 60 61 if (GUIExceptionDelegate.exceptionViewer == null) { 62 GUIExceptionDelegate.exceptionViewer = new ExceptionViewer(); 63 GUIExceptionDelegate.exceptionViewer.setSize(500, 450); 64 GUIExceptionDelegate.exceptionViewer.setVisible(true); 65 } else { 66 GUIExceptionDelegate.exceptionViewer.setVisible(true); 67 } 68 GUIExceptionDelegate.exceptionViewer.addException(super.getDelegatee()); 69 70 } else { 71 super.handleException(); 72 } 73 } 74 } 75 | Popular Tags |