1 20 21 package org.apache.directory.ldapstudio.browser.common; 22 23 24 import org.apache.directory.ldapstudio.browser.core.BrowserCorePlugin; 25 26 import org.eclipse.core.runtime.IStatus; 27 import org.eclipse.jface.dialogs.ErrorDialog; 28 import org.eclipse.swt.widgets.Display; 29 30 31 37 public class ExceptionHandler 38 { 39 45 public void handleException( IStatus status ) 46 { 47 display( null, status ); 48 } 49 50 51 59 private void display( final String message, final IStatus status ) 60 { 61 Runnable runnable = new Runnable () 62 { 63 public void run() 64 { 65 ErrorDialog.openError( Display.getDefault().getActiveShell(), "Error", message, status ); 66 } 67 }; 68 Display.getDefault().asyncExec( runnable ); 69 BrowserCorePlugin.getDefault().getLog().log( status ); 70 } 71 } 72 | Popular Tags |