Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNCancelException


*/
public class SVNErrorManager {

    public static void cancel(String message) throws SVNCancelException {
        SVNDebugLog.getDefaultLog().info(message);
        throw new SVNCancelException(SVNErrorMessage.create(SVNErrorCode.CANCELLED, message));
    }
View Full Code Here


        }
        if (log) {
            SVNDebugLog.getDefaultLog().info(err.getFullMessage());
        }
        if (err.getErrorCode() == SVNErrorCode.CANCELLED) {
            throw new SVNCancelException(err);
        } else if (err.getErrorCode().isAuthentication()) {
            throw new SVNAuthenticationException(err);
        } else {
            throw new SVNException(err);
        }
View Full Code Here

        if (err == null) {
            err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN);
        }
        SVNDebugLog.getDefaultLog().info(err.getMessage());
        if (err.getErrorCode() == SVNErrorCode.CANCELLED) {
            throw new SVNCancelException(err);
        } else if (err.getErrorCode().isAuthentication()) {
            throw new SVNAuthenticationException(err);
        } else {
            throw new SVNException(err, cause);
        }
View Full Code Here

            error(err1);
        }
        err1.setChildErrorMessage(err2);
        SVNDebugLog.getDefaultLog().info(err1.getMessage());
        if (err1.getErrorCode() == SVNErrorCode.CANCELLED || err2.getErrorCode() == SVNErrorCode.CANCELLED) {
            throw new SVNCancelException(err1);
        } else if (err1.getErrorCode().isAuthentication() || err2.getErrorCode().isAuthentication()) {
            throw new SVNAuthenticationException(err1);
        }
        throw new SVNException(err1);
    }
View Full Code Here

                            if (result == ISVNAuthenticationProvider.ACCEPTED && store) {
                                try {
                                    storeServerCertificate(myRealm, data, failures);
                                } catch (SVNException e) {
                                    CertificateException ce = new CertificateException("svn: Server SSL ceritificate for '" + myRealm + "' cannot be saved");
                                    ce.initCause(new SVNCancelException(SVNErrorMessage.create(SVNErrorCode.CANCELLED, ce.getMessage())));
                                    throw ce;
                                }
                            }
                            if (result != ISVNAuthenticationProvider.REJECTED) {
                                myAuthManager.getRuntimeAuthStorage().putData("svn.ssl.server", myRealm, data);
                                return;
                            }
                            CertificateException ce = new CertificateException("svn: Server SSL ceritificate for '" + myRealm + "' rejected");
                            ce.initCause(new SVNCancelException(SVNErrorMessage.create(SVNErrorCode.CANCELLED, ce.getMessage())));
                            throw ce;
                        }
                        // like as tmp. accepted.
                        return;
                    }
View Full Code Here

         * Verifies that the expected authentication happened.
         */
        public void checkIfProtocolCompleted() throws SVNCancelException {
            if(!authenticationAttempted) {
                logWriter.println("No authentication was attempted.");
                throw new SVNCancelException();
            }
            if (!authenticationAcknowledged) {
                logWriter.println("Authentication was not acknowledged.");
                throw new SVNCancelException();
            }
        }
View Full Code Here

        super.handleEvent(event, progress);
    }

    public void checkCancelled() throws SVNCancelException {
        if(Thread.interrupted())
            throw new SVNCancelException();
    }
View Full Code Here

        cancel(message, Level.FINE, logType);
    }
   
    public static void cancel(String message, Level logLevel, SVNLogType logType) throws SVNCancelException {
        SVNDebugLog.getDefaultLog().log(logType, message, logLevel);
        throw new SVNCancelException(SVNErrorMessage.create(SVNErrorCode.CANCELLED, message));
    }
View Full Code Here

        if (err == null) {
            err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN);
        }
        SVNDebugLog.getDefaultLog().log(logType, err.getFullMessage(), logLevel);
        if (err.getErrorCode() == SVNErrorCode.CANCELLED) {
            throw new SVNCancelException(err);
        } else if (err.getErrorCode().isAuthentication()) {
            throw new SVNAuthenticationException(err);
        } else {
            throw new SVNException(err);
        }
View Full Code Here

        if (err == null) {
            err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN);
        }
        SVNDebugLog.getDefaultLog().log(logType, err.getMessage(), logLevel);
        if (err.getErrorCode() == SVNErrorCode.CANCELLED) {
            throw new SVNCancelException(err);
        } else if (err.getErrorCode().isAuthentication()) {
            throw new SVNAuthenticationException(err);
        } else {
            throw new SVNException(err, cause);
        }
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.SVNCancelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.