de.cau.cs.kieler.core.ui
Class UnsupportedPartException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by de.cau.cs.kieler.core.ui.UnsupportedPartException

public class UnsupportedPartException
extends RuntimeException

Thrown when a diagram object such as an editor part or edit part is not supported. The most specific constructor takes a String as an explanation for the operation that is not supported, a reason why it is not supported and an Object, that is not supported in the context of the operation. The message will be built from these elements, which may be null.

Rating red

Constructor Summary
UnsupportedPartException(String message)
          Constructs a KIELER exception with given message.
UnsupportedPartException(String operation, String reason, Object notSupportedObject)
          Constructs a KIELER exception with given message and cause.
UnsupportedPartException(String operation, String reason, Object notSupportedObject, boolean nullConsideredEvil)
          Constructs a KIELER exception with given message and cause.
UnsupportedPartException(String message, Throwable cause)
          Constructs a KIELER exception with given message and cause.
 
Method Summary
 Object getNotSupportedObject()
           
 String getOperation()
           
 String getReason()
           
 
Methods inherited from class java.lang.Throwable
getMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnsupportedPartException

public UnsupportedPartException(String message)
Constructs a KIELER exception with given message.

Parameters:
message - readable exception message

UnsupportedPartException

public UnsupportedPartException(String operation,
                                String reason,
                                Object notSupportedObject)
Constructs a KIELER exception with given message and cause.

Parameters:
operation - the operation that is not supported
reason - a reason why the operation is not supported
notSupportedObject - an object for which the operation is not supported, e.g. a wrong parameter

UnsupportedPartException

public UnsupportedPartException(String operation,
                                String reason,
                                Object notSupportedObject,
                                boolean nullConsideredEvil)
Constructs a KIELER exception with given message and cause.

Parameters:
operation - the operation that is not supported
reason - a reason why the operation is not supported
notSupportedObject - an object for which the operation is not supported, e.g. a wrong parameter
nullConsideredEvil - true if a null-notSupportedObject should indicate a programming error where the location of that error is of great importance and should be indicated in the message

UnsupportedPartException

public UnsupportedPartException(String message,
                                Throwable cause)
Constructs a KIELER exception with given message and cause.

Parameters:
message - readable exception message
cause - exception that caused this exception
Method Detail

getNotSupportedObject

public Object getNotSupportedObject()
Returns:
object which in the context of the operation is not supported, e.g. a wrong parameter

getOperation

public String getOperation()
Returns:
a description or name of the Operation that is not supported

getReason

public String getReason()
Returns:
a descriptive explanation why the operation is not supported