1 11 package org.eclipse.team.internal.ccvs.core.connection; 12 13 14 import org.eclipse.core.runtime.IStatus; 15 import org.eclipse.core.runtime.MultiStatus; 16 import org.eclipse.team.internal.ccvs.core.CVSException; 17 import org.eclipse.team.internal.ccvs.core.CVSStatus; 18 19 22 public class CVSServerException extends CVSException { 23 24 private static final long serialVersionUID = 1L; 25 26 30 public boolean isNoTagException() { 31 IStatus status = getStatus(); 32 if ( ! status.isMultiStatus()) 33 return false; 34 IStatus[] children = ((MultiStatus)status).getChildren(); 35 for (int i = 0; i < children.length; i++) { 36 if (children[i].getCode() == CVSStatus.NO_SUCH_TAG) { 37 return true; 38 } 39 } 40 return false; 41 } 42 43 46 public boolean containsErrors() { 47 IStatus status = getStatus(); 48 if ( ! status.isMultiStatus()) 49 return status.getSeverity() == IStatus.ERROR; 50 IStatus[] children = ((MultiStatus)status).getChildren(); 51 for (int i=0;i<children.length;i++) { 52 if (children[i].getSeverity() == IStatus.ERROR) 53 return true; 54 } 55 return false; 56 } 57 58 61 public CVSServerException(IStatus status) { 62 super(status); 63 } 64 } 65 | Popular Tags |