www.sdmetrics.com

com.sdmetrics.metrics
Class SDMetricsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sdmetrics.metrics.SDMetricsException
All Implemented Interfaces:
java.io.Serializable

public class SDMetricsException
extends java.lang.RuntimeException

Exception to deal with problems that can occur during metrics calculation.

If this exception is thrown, it is always due to a bug in the metric definition file (typos, a required attribute is missing, an unknown metric is requested etc.) The only way to fix the problem is then to edit the metric definition file.

For a correct metric definition file, this exception will never be thrown. So unless users write their own metric definitions (and invariably make mistakes in the process), they should never experience any such errors during calculation.

See Also:
Serialized Form

Constructor Summary
SDMetricsException(ModelElement element, MetricEntry entry, java.lang.Exception cause)
          Constructor with an exception to be chained.
SDMetricsException(ModelElement element, MetricEntry entry, java.lang.String message)
          Constructor with message.
 
Method Summary
 ModelElement getElement()
          Gets the model element that caused the problem.
 MetricEntry getMetricEntry()
          Gets the metric, set, rule, or matrix that caused the problem.
 
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

SDMetricsException

public SDMetricsException(ModelElement element,
                          MetricEntry entry,
                          java.lang.String message)
Constructor with message.

Parameters:
element - The model element that caused the problem.
entry - The metric/set/rule that caused the problem.
message - A message describing the problem.

SDMetricsException

public SDMetricsException(ModelElement element,
                          MetricEntry entry,
                          java.lang.Exception cause)
Constructor with an exception to be chained.

Parameters:
element - The model element that caused the problem.
entry - The metric/set/rule that caused the problem.
cause - The exception causing the problem.
Method Detail

getElement

public ModelElement getElement()
Gets the model element that caused the problem.

Returns:
Model element that caused the problem.

getMetricEntry

public MetricEntry getMetricEntry()
Gets the metric, set, rule, or matrix that caused the problem.

Returns:
Metric entry that caused the problem.

www.sdmetrics.com