Class NamedFeatureCalculateException

All Implemented Interfaces:
Serializable, HasFriendlyErrorMessage

public class NamedFeatureCalculateException extends AnchorFriendlyCheckedException
An exception that occurs when a feature fails to successfully calculate.

The feature may optionally have a name associated with it, to help identify it to the user.

Author:
Owen Feehan
See Also:
  • Constructor Details

    • NamedFeatureCalculateException

      public NamedFeatureCalculateException(String message)
      Creates with a general failure message that doesn't pertain to any particular feature.
      Parameters:
      message - the message.
    • NamedFeatureCalculateException

      public NamedFeatureCalculateException(Exception cause)
      Creates with a calculation error that doesn't pertain to any particular feature.
      Parameters:
      cause - reason for failure.
    • NamedFeatureCalculateException

      public NamedFeatureCalculateException(String featureName, String message)
      Creates with a failure message associated with a particular feature.
      Parameters:
      featureName - a name to describe the feature whose calculation failed.
      message - the reason for failure.
  • Method Details

    • dropKey

      public FeatureCalculationException dropKey()
      Removes any feature-name from the exception.
      Returns:
      a newly-created similar exception, but lacking any identifier for which feature caused the exception.