private static String getErrorMessageString(SVNErrorMessage errorMessage) { if (errorMessage == null) { return null; } return errorMessage.getMessage(); }
public void writeError(SVNErrorMessage error) throws SVNException { Object[] buffer = new Object[]{"failure"}; write("(w(", buffer); for (; error != null; error = error.getChildErrorMessage()) { String message = error.getMessage() == null ? "" : error.getMessage(); buffer = new Object[]{new Long(error.getErrorCode().getCode()), message, "", new Integer(0)}; write("(nssn)", buffer); } write(")", null); }
public void writeError(SVNErrorMessage error) throws SVNException { Object[] buffer = new Object[]{"failure"}; write("(w(", buffer); for (; error != null; error = error.getChildErrorMessage()) { String message = error.getMessage() == null ? "" : error.getMessage(); buffer = new Object[]{new Long(error.getErrorCode().getCode()), message, "", new Integer(0)}; write("(nssn)", buffer); } write(")", null); }
public void writeError(SVNErrorMessage error) throws SVNException { Object[] buffer = new Object[]{"failure"}; write("(w(", buffer); for (; error != null; error = error.getChildErrorMessage()) { String message = error.getMessage() == null ? "" : error.getMessage(); buffer = new Object[]{new Long(error.getErrorCode().getCode()), message, "", new Integer(0)}; write("(nssn)", buffer); } write(")", null); }
public static void authenticationFailed(String message, Object messageObject) throws SVNAuthenticationException { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message, messageObject); SVNDebugLog.getDefaultLog().info(err.getMessage()); throw new SVNAuthenticationException(err); }
public static void authenticationFailed(String message, Object messageObject, Level logLevel) throws SVNAuthenticationException { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message, messageObject); SVNDebugLog.getDefaultLog().log(SVNLogType.NETWORK, err.getMessage(), logLevel); throw new SVNAuthenticationException(err); }
public static void authenticationFailed(String message, Object messageObject, Level logLevel) throws SVNAuthenticationException { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message, messageObject); SVNDebugLog.getDefaultLog().log(SVNLogType.NETWORK, err.getMessage(), logLevel); throw new SVNAuthenticationException(err); }
public static void authenticationFailed(String message, Object messageObject, Level logLevel) throws SVNAuthenticationException { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message, messageObject); SVNDebugLog.getDefaultLog().log(SVNLogType.NETWORK, err.getMessage(), logLevel); throw new SVNAuthenticationException(err); }
public void printCommitInfo(SVNCommitInfo info) { if (info != null && info.getNewRevision() >= 0 && info != SVNCommitInfo.NULL) { getOut().println("Committed revision " + info.getNewRevision() + "."); if (info.getErrorMessage() != null && info.getErrorMessage().isWarning()) { getOut().println("\n" + info.getErrorMessage().getMessage()); } } }
public void printCommitInfo(SVNCommitInfo info) { if (info != null && info.getNewRevision() >= 0 && info != SVNCommitInfo.NULL) { getOut().println("Committed revision " + info.getNewRevision() + "."); if (info.getErrorMessage() != null && info.getErrorMessage().isWarning()) { getOut().println("\n" + info.getErrorMessage().getMessage()); } } }
private static DAVException buildErrorChain(SVNErrorMessage err, int statusCode) { DAVException error = new DAVException(err.getMessage(), null, statusCode, err, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, err.getErrorCode().getCode(), null); if (err.getChildErrorMessage() != null) { error.setPreviousException(buildErrorChain(err.getChildErrorMessage(), statusCode)); } return error; }
public static void sendError(@NotNull SvnServerWriter writer, @NotNull SVNErrorMessage errorMessage) throws IOException { writer .listBegin() .word("failure") .listBegin() .listBegin() .number(errorMessage.getErrorCode().getCode()) .string(errorMessage.getMessage()) .string("") .number(0) .listEnd() .listEnd() .listEnd(); } }
public static void error(SVNErrorMessage err, Throwable cause) throws SVNException { 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); } }
public static void error(SVNErrorMessage err, Throwable cause, Level logLevel, SVNLogType logType) throws SVNException { if (err == null) { err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN); } SVNDebugLog.getDefaultLog().log(logType, err.getMessage(), logLevel); if (cause != null) { SVNDebugLog.getDefaultLog().log(logType, cause, 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); } }
public static void error(SVNErrorMessage err, Throwable cause, Level logLevel, SVNLogType logType) throws SVNException { if (err == null) { err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN); } SVNDebugLog.getDefaultLog().log(logType, err.getMessage(), logLevel); if (cause != null) { SVNDebugLog.getDefaultLog().log(logType, cause, 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); } }
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); }
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, 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); } else if (err1.getErrorCode().isAuthentication() || err2.getErrorCode().isAuthentication()) { throw new SVNAuthenticationException(err1, cause); } throw new SVNException(err1, cause); } }