Class RegexTimeoutException

All Implemented Interfaces:
Serializable

public class RegexTimeoutException extends RuntimeException
Thrown when a regular expression match exceeds its time budget.

This is an unchecked exception because it is thrown from within CharSequence.charAt(int), which the java.util.regex engine calls during matching. Callers that use SafeRegex.matcher(java.util.regex.Pattern, CharSequence) directly should catch this exception; the convenience methods SafeRegex.matches(Pattern, CharSequence) and SafeRegex.find(Pattern, CharSequence) catch it internally and return false.

See Also:
  • Constructor Details

    • RegexTimeoutException

      public RegexTimeoutException()
    • RegexTimeoutException

      public RegexTimeoutException(String message)