|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.rapidminer.operator.OperatorException
com.rapidminer.operator.UserError
public class UserError
Exception class whose instances are thrown due to a user error, for example
missing files or wrong operator architecture.
In order to create a UserError, do the following:
UserErrorMessages.properties in the
resources directory. Look for an appropriate message. If you
find one, remember its id. If not, create a new one in the correct
groupjava.text.MessageFormat. Especially, any
occurrence of curly brackets will be replaced. Be careful with quotes; it
might be a good idea to read the documentation of MessageFormat first.
| Constructor Summary | |
|---|---|
UserError(Operator operator,
int code)
Convenience constructor for messages with no arguments. |
|
UserError(Operator operator,
int code,
java.lang.Object... arguments)
|
|
UserError(Operator operator,
java.lang.String errorId)
Convenience constructor for messages with no arguments. |
|
UserError(Operator operator,
java.lang.String errorId,
java.lang.Object... arguments)
|
|
UserError(Operator operator,
java.lang.Throwable cause,
int code)
Convenience constructor for messages with no arguments and cause. |
|
UserError(Operator operator,
java.lang.Throwable cause,
int code,
java.lang.Object... arguments)
Creates a new UserError. |
|
UserError(Operator operator,
java.lang.Throwable cause,
java.lang.String errorId)
Convenience constructor for messages with no arguments and cause. |
|
UserError(Operator operator,
java.lang.Throwable cause,
java.lang.String errorId,
java.lang.Object... arguments)
|
|
| Method Summary | |
|---|---|
int |
getCode()
Returns the error code. |
java.lang.String |
getDetails()
Returns the error details/description. |
static java.lang.String |
getErrorMessage(int code,
java.lang.Object[] arguments)
|
static java.lang.String |
getErrorMessage(java.lang.String identifier,
java.lang.Object[] arguments)
|
java.lang.String |
getErrorName()
Returns the error name. |
java.lang.String |
getHTMLMessage()
Returns a html message. |
Operator |
getOperator()
|
static java.lang.String |
getResourceString(int code,
java.lang.String key,
java.lang.String deflt)
Returns a resource message for the given error code. |
static java.lang.String |
getResourceString(java.lang.String id,
java.lang.String key,
java.lang.String deflt)
This returns a resource message of the internationalized error messages identified by an id. |
void |
setOperator(Operator operator)
|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UserError(Operator operator,
java.lang.Throwable cause,
int code,
java.lang.Object... arguments)
operator - The Operator in which the exception occured.cause - The exception that caused the user error. May be null. Using
this makes debugging a lot easier.code - The error code referring to a message in the file
UserErrorMessages.propertiesarguments - Arguments for the short message.
public UserError(Operator operator,
java.lang.Throwable cause,
int code)
public UserError(Operator operator,
int code,
java.lang.Object... arguments)
public UserError(Operator operator,
int code)
public UserError(Operator operator,
java.lang.Throwable cause,
java.lang.String errorId,
java.lang.Object... arguments)
public UserError(Operator operator,
java.lang.Throwable cause,
java.lang.String errorId)
public UserError(Operator operator,
java.lang.String errorId,
java.lang.Object... arguments)
public UserError(Operator operator,
java.lang.String errorId)
| Method Detail |
|---|
public java.lang.String getDetails()
NoBugError
getDetails in interface NoBugErrorpublic java.lang.String getErrorName()
NoBugError
getErrorName in interface NoBugErrorpublic int getCode()
NoBugError
getCode in interface NoBugErrorpublic Operator getOperator()
public void setOperator(Operator operator)
public static java.lang.String getErrorMessage(int code,
java.lang.Object[] arguments)
public static java.lang.String getErrorMessage(java.lang.String identifier,
java.lang.Object[] arguments)
public static java.lang.String getResourceString(int code,
java.lang.String key,
java.lang.String deflt)
key - one out of "name", "short",
"long"
public static java.lang.String getResourceString(java.lang.String id,
java.lang.String key,
java.lang.String deflt)
getResourceString(int, String, String)
this supports a more detailed identifier.
This makes it easier to ensure extensions don't reuse already defined core errors. It is common sense to
add the extensions namespace identifier as second part of the key, just after error.
For example: error.rmx_web.operator.unusable = This operator {0} is unusable.
id - The identifier of the error. "error." will be automatically prepended-key - The part of the error description that should be shown.deflt - The default if no resource bundle is available.public java.lang.String getHTMLMessage()
NoBugError
getHTMLMessage in interface NoBugError
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||