Interface SanitizableException

All Known Implementing Classes:
BadJsonQueryException, BadQueryContextException, BadQueryException, ExpressionProcessingException, ISE, QueryCapacityExceededException, QueryException, QueryInterruptedException, QueryTimeoutException, QueryUnsupportedException, ResourceLimitExceededException, SegmentMissingException, UOE

public interface SanitizableException
  • Method Summary

    Modifier and Type
    Method
    Description
    sanitize(Function<String,String> errorMessageTransformFunction)
    Apply the function for transforming the error message then return new Exception with sanitized fields and transformed message.
  • Method Details

    • sanitize

      Exception sanitize(Function<String,String> errorMessageTransformFunction)
      Apply the function for transforming the error message then return new Exception with sanitized fields and transformed message. The is only intended to be used to transform the error message String of the Exception as only the error message String is common to all Exception classes. For other fields (which may be unique to each particular Exception class), each implementation of this method can decide for itself how to sanitize those fields (i.e. leaving unchanged, changing to null, changing to a fixed String, etc.). Note that this method returns a new Exception of the same type since Exception error message is immutable.