/** * Creates an exception given an error message. * * @param errorMessage an error message */ public SVNException(SVNErrorMessage errorMessage) { this(errorMessage, errorMessage.getCause()); }
/** * Creates an exception given an error message. * * @param errorMessage an error message */ public SVNException(SVNErrorMessage errorMessage) { this(errorMessage, errorMessage.getCause()); }
/** * Creates an exception given an error message. * * @param errorMessage an error message */ public SVNException(SVNErrorMessage errorMessage) { this(errorMessage, errorMessage.getCause()); }
/** * Constructs an <b>SVNCancelException</b> given the * error message. * * @param errorMessage an error message describing why the operation * was cancelled */ public SVNCancelException(SVNErrorMessage errorMessage) { this(errorMessage, errorMessage.getCause()); }
/** * Creates a new authentication exception given detailed error * information and the original cause. * * @param errorMessage an error message * @param cause an original cause */ public SVNAuthenticationException(SVNErrorMessage errorMessage, Throwable cause) { super(errorMessage, cause != null ? cause : errorMessage.getCause()); }
/** * Creates a new authentication exception given detailed error * information. * * @param errorMessage an error message */ public SVNAuthenticationException(SVNErrorMessage errorMessage) { super(errorMessage, errorMessage.getCause()); } }
public SVNCancelException(SVNErrorMessage errorMessage, Throwable cause) { super(errorMessage, cause != null ? cause : errorMessage.getCause()); } }
private static Throwable findCause(SVNErrorMessage errorMessage, Throwable cause) { if(cause!=null) return cause; // SVNErrorMessage has its own chaining mechanism, so if no 'cause' is given, try to pick up // the nearset exception from there, so that printStackTrace() would print the root cause. for( SVNErrorMessage e = errorMessage; e!=null; e=e.getChildErrorMessage() ) if(e.getCause()!=null) return e.getCause(); return null; }
@Override public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { authenticationAcknowledged = true; if (accepted) { assert cred != null; onSuccess(realm,cred); } else { logWriter.println("Failed to authenticate: " + errorMessage); if (errorMessage.getCause() != null) errorMessage.getCause().printStackTrace(logWriter); } super.acknowledgeAuthentication(accepted, kind, realm, errorMessage, authentication); }
@Override public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { authenticationAcknowledged = true; if (accepted) { assert cred != null; onSuccess(realm, cred,overrideGlobal); } else { logWriter.println("Failed to authenticate: " + errorMessage); if (errorMessage.getCause() != null) { errorMessage.getCause().printStackTrace(logWriter); } } super.acknowledgeAuthentication(accepted, kind, realm, errorMessage, authentication); }
/** * This method has been deprecated as of hudson 2.2.0. This is for support for only old versions of svnkit where * overriding acknowledgeAuthentication needed to be overriden. * */ @Override @Deprecated public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { authenticationAcknowledged = true; if (accepted) { assert cred != null; onSuccess(realm, cred,overrideGlobal); } else { logWriter.println("Failed to authenticate: " + errorMessage); if (errorMessage.getCause() != null) { errorMessage.getCause().printStackTrace(logWriter); } } super.acknowledgeAuthentication(accepted, kind, realm, errorMessage, authentication); }
/** * Creates an exception given an error message and the cause exception. * * @param errorMessage an error message * @param cause the real cause of the error */ public SVNException(SVNErrorMessage errorMessage, Throwable cause) { super(cause != null ? cause : errorMessage.getCause()); if (cause == null) { cause = errorMessage.getCause(); } if (cause instanceof SVNException) { SVNErrorMessage childMessages = ((SVNException) cause).getErrorMessage(); SVNErrorMessage parent = errorMessage; while(parent.hasChildErrorMessage()) { parent = parent.getChildErrorMessage(); } if (parent != childMessages) { parent.setChildErrorMessage(childMessages); } } myErrorMessage = errorMessage; if (getCause() == null && errorMessage != null) { errorMessage.initCause(this); } }
SVNErrorMessage err2 = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "{0} request failed on ''{1}''", new Object[] {method, path}, err.getType(), err.getCause()); SVNErrorManager.error(err, err2, SVNLogType.NETWORK); return null;
SVNErrorMessage err2 = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "{0} request failed on ''{1}''", new Object[] {method, path}, err.getType(), err.getCause()); SVNErrorManager.error(err, err2, SVNLogType.NETWORK); return null;
SVNErrorMessage err2 = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "{0} request failed on ''{1}''", new Object[] {method, path}, err.getType(), err.getCause()); SVNErrorManager.error(err, err2, SVNLogType.NETWORK); return null;