Sideway
output.to from Sideway
Draft for Information Only

Content

Regex Match Timeout 
 RegexMatchTimeoutException Class
  Constructors
  Properties
  Explicit Interface Implementations
  Methods
  Events
  Remarks
  Applies to
  See also
 Source/Reference

Regex Match Timeout 

RegexMatchTimeoutException Class

The exception that is thrown when the execution time of a regular expression pattern-matching method exceeds its time-out interval.

NamespaceSystem.Text.RegularExpressions AssembliesSystem.Text.RegularExpressions.dll, System.dll, netstandard.dll
[System.Serializable]
public class RegexMatchTimeoutException : TimeoutException
InheritanceObject->Exception->SystemException->TimeoutException->RegexMatchTimeoutException AttributesSerializableAttribute ImplementsISerializable

Constructors

RegexMatchTimeoutException()

Initializes a new instance of the RegexMatchTimeoutException class with a system-supplied message.

RegexMatchTimeoutException(SerializationInfo, StreamingContext)

Initializes a new instance of the RegexMatchTimeoutException class with serialized data.

RegexMatchTimeoutException(String)

Initializes a new instance of the RegexMatchTimeoutException class with the specified message string.

RegexMatchTimeoutException(String, Exception)

Initializes a new instance of the RegexMatchTimeoutException class with a specified error message and a reference to the inner exception that is the cause of this exception.

RegexMatchTimeoutException(String, String, TimeSpan)

Initializes a new instance of the RegexMatchTimeoutException class with information about the regular expression pattern, the input text, and the time-out interval.

Properties

Data

Gets a collection of key/value pairs that provide additional user-defined information about the exception.

(Inherited from Exception)
HelpLink

Gets or sets a link to the help file associated with this exception.

(Inherited from Exception)
HResult

Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.

(Inherited from Exception)
InnerException

Gets the Exception instance that caused the current exception.

(Inherited from Exception)
Input

Gets the input text that the regular expression engine was processing when the time-out occurred.

MatchTimeout

Gets the time-out interval for a regular expression match.

Message

Gets a message that describes the current exception.

(Inherited from Exception)
Pattern

Gets the regular expression pattern that was used in the matching operation when the time-out occurred.

Source

Gets or sets the name of the application or the object that causes the error.

(Inherited from Exception)
StackTrace

Gets a string representation of the immediate frames on the call stack.

(Inherited from Exception)
TargetSite

Gets the method that throws the current exception.

(Inherited from Exception)

Explicit Interface Implementations

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo object with the data needed to serialize a RegexMatchTimeoutException object.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetBaseException()

When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.

(Inherited from Exception)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.

(Inherited from Exception)
GetType()

Gets the runtime type of the current instance.

(Inherited from Exception)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Creates and returns a string representation of the current exception.

(Inherited from Exception)

Events

SerializeObjectState

Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.

(Inherited from Exception)

Remarks

  • The presence of a RegexMatchTimeoutException exception generally indicates one of the following conditions:

    • The regular expression engine is backtracking excessively as it attempts to match the input text to the regular expression pattern.

    • The time-out interval has been set too low, especially given high machine load.

    The way in which an exception handler handles an exception depends on the cause of the exception:

    • If the time-out results from excessive backtracking, your exception handler should abandon the attempt to match the input and inform the user that a time-out has occurred in the regular expression pattern-matching method. If possible, information about the regular expression pattern, which is available from the Pattern property, and the input that caused excessive backtracking, which is available from the Input property, should be logged so that the issue can be investigated and the regular expression pattern modified. Time-outs due to excessive backtracking are always reproducible.

    • If the time-out results from setting the time-out threshold too low, you can increase the time-out interval and retry the matching operation. The current time-out interval is available from the MatchTimeout property. When a RegexMatchTimeoutException exception is thrown, the regular expression engine maintains its state so that any future invocations return the same result, as if the exception did not occur. The recommended pattern is to wait for a brief, random time interval after the exception is thrown before calling the matching method again. This can be repeated several times. However, the number of repetitions should be small in case the time-out is caused by excessive backtracking.

     

Applies to

.NET Framework: 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5

See also

    • Backtracking
    • Best Practices for Regular Expressions in the .NET Framework

Source/Reference

  • https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regexmatchtimeoutexception?view=netframework-4.8

©sideway

ID: 200700006 Last Updated: 7/6/2020 Revision: 0 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019