diff dwtx/core/commands/Command.d @ 90:7ffeace6c47f

Update 3.4M7 to 3.4
author Frank Benoit <benoit@tionex.de>
date Sun, 06 Jul 2008 23:30:07 +0200
parents 4878bef4a38e
children
line wrap: on
line diff
--- a/dwtx/core/commands/Command.d	Sun Jun 22 22:57:31 2008 +0200
+++ b/dwtx/core/commands/Command.d	Sun Jul 06 23:30:07 2008 +0200
@@ -45,6 +45,7 @@
 
 import dwt.dwthelper.utils;
 import tango.text.convert.Format;
+import tango.io.Stdout;
 
 /**
  * <p>
@@ -862,7 +863,18 @@
             return false;
         }
 
-        return handler.isEnabled();
+        try {
+            return handler.isEnabled();
+        } catch (Exception e) {
+            if (DEBUG_HANDLERS) {
+                // since this has the ability to generate megs of logs, only
+                // provide information if tracing
+                Tracing.printTrace("HANDLERS", "Handler " ~ (cast(Object)handler).toString()  ~ " for "  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+                        ~ id ~ " threw unexpected exception"); //$NON-NLS-1$
+                ExceptionPrintStackTrace( e, Stdout );
+            }
+        }
+        return false;
     }
 
     /**