/** * Creates an error message given an error code, description and a type ( * whether it's a warning or an error). * * @param code an error code * @param message an error description * @param type an error type * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, int type) { return new SVNErrorMessage(code, message, EMPTY_ARRAY, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be related objects to be * formatted with the error description. To format the provided <code>objects</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param objects an array of objects related to the error <code>message</code> * @param type an error type * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object[] objects, int type) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, objects == null ? EMPTY_ARRAY : objects, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be a related object to be * formatted with the error description. To format the provided <code>object</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param object an object related to the error <code>message</code> * @param type an error type * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object object, int type) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, object == null ? new Object[] {"NULL"} : new Object[] {object}, null, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be a related object to be * formatted with the error description. To format the provided <code>object</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param object an object related to the error <code>message</code> * @param type an error type * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object object, int type) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, object == null ? new Object[] {"NULL"} : new Object[] {object}, null, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be a related object to be * formatted with the error description. To format the provided <code>object</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param object an object related to the error <code>message</code> * @param type an error type * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object object, int type) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, object == null ? new Object[] {"NULL"} : new Object[] {object}, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be a related object to be * formatted with the error description. To format the provided <code>object</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param object an object related to the error <code>message</code> * @param type an error type * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object object, int type) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, object == null ? new Object[] {"NULL"} : new Object[] {object}, null, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be related objects to be * formatted with the error description and an optional cause. * To format the provided <code>objects</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param objects an array of objects related to the error <code>message</code> * @param type an error type * @param cause cause of the error * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object[] objects, int type, Throwable cause) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, objects == null ? EMPTY_ARRAY : objects, cause, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be related objects to be * formatted with the error description and an optional cause. * To format the provided <code>objects</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param objects an array of objects related to the error <code>message</code> * @param type an error type * @param cause cause of the error * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object[] objects, int type, Throwable cause) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, objects == null ? EMPTY_ARRAY : objects, cause, type); }
/** * Creates an error message given an error code, description, an error type * (whether it's a warning or an error) and may be related objects to be * formatted with the error description and an optional cause. * To format the provided <code>objects</code> * with the <code>message</code>, you should use valid format patterns parsable for * {@link MessageFormat}. * * @param code an error code * @param message an error description * @param objects an array of objects related to the error <code>message</code> * @param type an error type * @param cause cause of the error * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, String message, Object[] objects, int type, Throwable cause) { return new SVNErrorMessage(code == null ? SVNErrorCode.BASE : code, message == null ? "" : message, objects == null ? EMPTY_ARRAY : objects, cause, type); }
/** * Creates an error message given an error code and cause. * * @param code an error code * @param cause cause of the error * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, Throwable cause) { if (cause != null) { return new SVNErrorMessage(code, cause.getMessage(), new Object[0], cause, TYPE_ERROR); } return create(code); }
/** * Creates an error message given an error code and cause. * * @param code an error code * @param cause cause of the error * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, Throwable cause) { if (cause != null) { return new SVNErrorMessage(code, cause.getMessage(), new Object[0], cause, TYPE_ERROR); } return create(code); }
/** * Creates an error message given an error code and cause. * * @param code an error code * @param cause cause of the error * @return a new error message */ public static SVNErrorMessage create(SVNErrorCode code, Throwable cause) { if (cause != null) { return new SVNErrorMessage(code, cause.getMessage(), new Object[0], cause, TYPE_ERROR); } return create(code); }