/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @param relatedObject an object to be formatted with <code>parentMessage</code> * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage, Object relatedObject){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage, relatedObject); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description <code>parentMessage</code> with corresponding <code>relatedObjects</code> to * format the error description, and this error message as its child. * * @param parentMessage a parent error description * @param relatedObjects objects to be formatted with <code>parentMessage</code> * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage, Object[] relatedObjects){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage, relatedObjects); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description <code>parentMessage</code> with corresponding <code>relatedObjects</code> to * format the error description, and this error message as its child. * * @param parentMessage a parent error description * @param relatedObjects objects to be formatted with <code>parentMessage</code> * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage, Object[] relatedObjects){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage, relatedObjects); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @param relatedObject an object to be formatted with <code>parentMessage</code> * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage, Object relatedObject){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage, relatedObject); parentError.setChildErrorMessage(this); return parentError; }
/** * Wraps this error message into a new one that is returned as * a parent error message. A parent message is set the error code * of this error message, a new error description and this error * message as its child. * * @param parentMessage a parent error description * @param relatedObject an object to be formatted with <code>parentMessage</code> * @return a parent error message */ public SVNErrorMessage wrap(String parentMessage, Object relatedObject){ SVNErrorMessage parentError = SVNErrorMessage.create(this.getErrorCode(), parentMessage, relatedObject); parentError.setChildErrorMessage(this); return parentError; }
public static void handleFailureStatus(List list) throws SVNException { if (list.size() == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Empty error list"); SVNErrorManager.error(err, SVNLogType.NETWORK); } SVNErrorMessage topError = getErrorMessage((SVNItem) list.get(list.size() - 1)); SVNErrorMessage parentError = topError; for (int i = list.size() - 2; i >= 0; i--) { SVNItem item = (SVNItem) list.get(i); SVNErrorMessage error = getErrorMessage(item); parentError.setChildErrorMessage(error); parentError = error; } SVNErrorManager.error(topError, SVNLogType.NETWORK); }
public static void handleFailureStatus(List list) throws SVNException { if (list.size() == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Empty error list"); SVNErrorManager.error(err, SVNLogType.NETWORK); } SVNErrorMessage topError = getErrorMessage((SVNItem) list.get(list.size() - 1)); SVNErrorMessage parentError = topError; for (int i = list.size() - 2; i >= 0; i--) { SVNItem item = (SVNItem) list.get(i); SVNErrorMessage error = getErrorMessage(item); parentError.setChildErrorMessage(error); parentError = error; } SVNErrorManager.error(topError, SVNLogType.NETWORK); }
public static void handleFailureStatus(List list) throws SVNException { if (list.size() == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Empty error list"); SVNErrorManager.error(err, SVNLogType.NETWORK); } SVNErrorMessage topError = getErrorMessage((SVNItem) list.get(list.size() - 1)); SVNErrorMessage parentError = topError; for (int i = list.size() - 2; i >= 0; i--) { SVNItem item = (SVNItem) list.get(i); SVNErrorMessage error = getErrorMessage(item); parentError.setChildErrorMessage(error); parentError = error; } SVNErrorManager.error(topError, SVNLogType.NETWORK); }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to open repository ''{0}''", getLocation().toDecodedString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open an ra_local session to URL"), SVNLogType.FSFS); } }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to open repository ''{0}''", getLocation().toDecodedString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open an ra_local session to URL"), SVNLogType.FSFS); } }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to open repository ''{0}''", getLocation().toDecodedString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open an ra_local session to URL")); } }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to connect to a repository at URL ''{0}''", getLocation().toString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open repository ''{0}''", new Object[]{getLocation()}), SVNLogType.FSFS); } }
public static void error(SVNErrorMessage err1, SVNErrorMessage err2, Throwable cause, Level logLevel, SVNLogType logType) throws SVNException { if (err1 == null) { error(err2, cause, logLevel, logType); } else if (err2 == null) { error(err1, cause, logLevel, logType); } err1.setChildErrorMessage(err2); SVNDebugLog.getDefaultLog().log(logType, err1.getMessage(), logLevel); if (err1.getErrorCode() == SVNErrorCode.CANCELLED || err2.getErrorCode() == SVNErrorCode.CANCELLED) { throw new SVNCancelException(err1, cause); } else if (err1.getErrorCode().isAuthentication() || err2.getErrorCode().isAuthentication()) { throw new SVNAuthenticationException(err1, cause); } throw new SVNException(err1, cause); }
public static void error(SVNErrorMessage err1, SVNErrorMessage err2, Level logLevel, SVNLogType logType) throws SVNException { if (err1 == null) { error(err2, logLevel, logType); } else if (err2 == null) { error(err1, logLevel, logType); } err1.setChildErrorMessage(err2); SVNDebugLog.getDefaultLog().log(logType, err1.getMessage(), logLevel); 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); }
public static void error(SVNErrorMessage err1, SVNErrorMessage err2, Level logLevel, SVNLogType logType) throws SVNException { if (err1 == null) { error(err2, logLevel, logType); } else if (err2 == null) { error(err1, logLevel, logType); } err1.setChildErrorMessage(err2); SVNDebugLog.getDefaultLog().log(logType, err1.getMessage(), logLevel); 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); }
public static void error(SVNErrorMessage err1, SVNErrorMessage err2, Level logLevel, SVNLogType logType) throws SVNException { if (err1 == null) { error(err2, logLevel, logType); } else if (err2 == null) { error(err1, logLevel, logType); } err1.setChildErrorMessage(err2); SVNDebugLog.getDefaultLog().log(logType, err1.getMessage(), logLevel); 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); }