Merging code from trunk that fixes #774, this work was done by incastrix
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / RefreshBookmarkAction.java
index 366644b..3250564 100644 (file)
@@ -8,6 +8,7 @@ import com.quantum.ImageStore;
 import com.quantum.Messages;
 import com.quantum.model.NotConnectedException;
 import com.quantum.ui.dialog.ExceptionDisplayDialog;
+import com.quantum.ui.dialog.SQLExceptionDialog;
 import com.quantum.view.bookmark.TreeNode;
 
 import org.eclipse.ui.IViewPart;
@@ -44,7 +45,12 @@ public class RefreshBookmarkAction extends SelectionListenerAction {
         * @param e
         */
        private void handleException(Throwable t) {
-               ExceptionDisplayDialog.openError(
-                               this.view.getSite().getShell(), null, null, t);
+               if (t instanceof SQLException) {
+                       SQLExceptionDialog.openException(
+                                       this.view.getSite().getShell(), null, (SQLException) t);
+               } else {
+                       ExceptionDisplayDialog.openError(
+                                       this.view.getSite().getShell(), null, null, t);
+               }
        }
 }