com.rapidminer.operator
Class UserError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.rapidminer.operator.OperatorException
              extended by com.rapidminer.operator.UserError
All Implemented Interfaces:
NoBugError, java.io.Serializable
Direct Known Subclasses:
MissingIOObjectException, UndefinedParameterError

public class UserError
extends OperatorException
implements NoBugError

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:

Author:
Simon Fischer, Ingo Mierswa
See Also:
Serialized Form

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.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.
 
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)
           
 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.
 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

UserError

public UserError(Operator operator,
                 java.lang.Throwable cause,
                 int code,
                 java.lang.Object... arguments)
Creates a new UserError.

Parameters:
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.properties
arguments - Arguments for the short message.

UserError

public UserError(Operator operator,
                 java.lang.Throwable cause,
                 int code)
Convenience constructor for messages with no arguments and cause.


UserError

public UserError(Operator operator,
                 int code,
                 java.lang.Object... arguments)

UserError

public UserError(Operator operator,
                 int code)
Convenience constructor for messages with no arguments.

Method Detail

getDetails

public java.lang.String getDetails()
Description copied from interface: NoBugError
Returns the error details/description.

Specified by:
getDetails in interface NoBugError

getErrorName

public java.lang.String getErrorName()
Description copied from interface: NoBugError
Returns the error name.

Specified by:
getErrorName in interface NoBugError

getCode

public int getCode()
Description copied from interface: NoBugError
Returns the error code.

Specified by:
getCode in interface NoBugError

getOperator

public Operator getOperator()

setOperator

public void setOperator(Operator operator)

getErrorMessage

public static java.lang.String getErrorMessage(int code,
                                               java.lang.Object[] arguments)

getResourceString

public static java.lang.String getResourceString(int code,
                                                 java.lang.String key,
                                                 java.lang.String deflt)
Returns a resource message for the given error code.

Parameters:
key - one out of "name", "short", "long"

getHTMLMessage

public java.lang.String getHTMLMessage()
Description copied from interface: NoBugError
Returns a html message.

Specified by:
getHTMLMessage in interface NoBugError


Copyright © 2001-2009 by Rapid-I