added first version of codetemplates (needs to fix some bugs)
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / PHPUIStatus.java
index 91e1537..4fcf12a 100644 (file)
@@ -29,7 +29,15 @@ public class PHPUIStatus extends Status {
   public PHPUIStatus(int code, String message, Throwable throwable) {
     super(IStatus.ERROR, PHPeclipsePlugin.getPluginId(), code, message, throwable);
   }
-
+  
+  public static IStatus createError(int code, Throwable throwable) {
+       String message= throwable.getMessage();
+       if (message == null) {
+               message= throwable.getClass().getName();
+       }
+       return new PHPUIStatus(IStatus.ERROR, code, message, throwable);
+  }
+  
   public static IStatus createError(int code, String message, Throwable throwable) {
     return new PHPUIStatus(IStatus.ERROR, code, message, throwable);
   }