org.tmatesoft.svn.core
public class SVNErrorMessage extends Object implements Serializable
Error messages may be formatted. SVNErrorMessage performs formatting with the help of the JDK's MessageFormat class. To make a formatted message, use MessageFormat parsable format patterns and provide an array of related objects when creating an SVNErrorMessage.
Error messages may be supplied within exceptions of the main exception type - SVNException.
Version: 1.1.1
Field Summary | |
---|---|
static int | TYPE_ERROR
Error messages of this type are considered to be errors (most critical) rather
than warnings. |
static int | TYPE_WARNING
Error messages of this type are considered to be warnings, what in certain
situations may be OK. |
static SVNErrorMessage | UNKNOWN_ERROR_MESSAGE
This is a type of an error message denoting an error of an unknown nature.
|
Constructor Summary | |
---|---|
protected | SVNErrorMessage(SVNErrorCode code, String message, Object[] relatedObjects, Throwable th, int type) |
Method Summary | |
---|---|
static SVNErrorMessage | create(SVNErrorCode code)
Creates an error message given an error code.
|
static SVNErrorMessage | create(SVNErrorCode code, String message)
Creates an error message given an error code and description.
|
static SVNErrorMessage | create(SVNErrorCode code, Throwable cause)
Creates an error message given an error code and cause.
|
static SVNErrorMessage | create(SVNErrorCode code, String message, Object object)
Creates an error message given an error code, description and may be a related
object to be formatted with the error description.
|
static SVNErrorMessage | create(SVNErrorCode code, String message, Object[] objects)
Creates an error message given an error code, description and may be related
objects to be formatted with the error description.
|
static SVNErrorMessage | create(SVNErrorCode code, String message, int type)
Creates an error message given an error code, description and a type (
whether it's a warning or an error).
|
static SVNErrorMessage | create(SVNErrorCode code, String message, Object object, int 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. |
static SVNErrorMessage | create(SVNErrorCode code, String message, Object[] objects, int 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. |
Throwable | getCause()
Returns throwable that is cause of the error if any.
|
SVNErrorMessage | getChildErrorMessage()
Returns an error message (if any) that was returned from a
deeper method call. |
SVNErrorCode | getErrorCode()
Returns the error code of the error.
|
String | getFullMessage()
Gets a string representation of the entire stack trace of
error messages (if they were provided) starting with the initial
cause of the error.
|
String | getMessage()
Returns an error description formatted with the
related objects if needed. |
String | getMessageTemplate()
Returns an error description which may contain message format
patterns.
|
Object[] | getRelatedObjects()
Returns objects (if any) that were provided to be formatted
with the error description. |
int | getType()
Returns the type of the error (whether it's a warning or an error).
|
boolean | hasChildErrorMessage()
Says if this error message object has got a child error message.
|
boolean | isWarning()
Returns true if this message is a warning message, not error one.
|
void | setChildErrorMessage(SVNErrorMessage childMessage)
Sets a child error message for this one.
|
String | toString()
Returns a string representation of this error message object
formatting (if needed) the error description with the provided related objects.
|
SVNErrorMessage | wrap(String parentMessage)
Wraps this error message into a new one that is returned as
a parent error message. |
SVNErrorMessage | wrap(String parentMessage, Object relatedObject)
Wraps this error message into a new one that is returned as
a parent error message. |
SVNErrorMessage | wrap(String parentMessage, Object[] relatedObjects) |
Parameters: code an error code
Returns: a new error message
Parameters: code an error code message an error description
Returns: a new error message
Parameters: code an error code cause cause of the error
Returns: a new error message
object
with the message
, you
should use valid format patterns parsable for MessageFormat.
Parameters: code an error code message an error description object an object related to the error message
Returns: a new error message
objects
with the message
, you
should use valid format patterns parsable for MessageFormat.
Parameters: code an error code message an error description objects an array of objects related to the error message
Returns: a new error message
Parameters: code an error code message an error description type an error type
Returns: a new error message
object
with the message
, you should use valid format patterns parsable for
MessageFormat.
Parameters: code an error code message an error description object an object related to the error message
type an error type
Returns: a new error message
objects
with the message
, you should use valid format patterns parsable for
MessageFormat.
Parameters: code an error code message an error description objects an array of objects related to the error message
type an error type
Returns: a new error message
Returns: throwable that caused error or null if not applicable or not known.
Returns: a child error message object (if this object is not the first one)
Returns: th error code of the error
Returns: a string representing a full list of error messages
Returns: an error message
Returns: an error description
Returns: an array of objects
Returns: the type of this error message
Returns: true if has, false otherwise (for example, an initial error message would not have a child error message)
Returns: true or false
Parameters: childMessage a child error message
Returns: a string representing this object.
Parameters: parentMessage a parent error description
Returns: a parent error message
Parameters: parentMessage a parent error description relatedObject an object to be formatted with parentMessage
Returns: a parent error message