InvalidRegex class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (tags, edits and links)
mNo edit summary
Line 1: Line 1:
<!-- InvalidRegex class -->
<!-- InvalidRegex class -->
__NOTOC__
The <var>InvalidRegex</var> exception class describes an exception associated with an invalid <var class="term">[[Regex_processing|Regular Expression]]</var> being passed to a method that takes a <var>regular expression</var> argument.
The <var>InvalidRegex</var> exception class describes an exception associated with an invalid <var class="term">[[Regex_processing|Regular Expression]]</var> being passed to a method that takes a <var>regular expression</var> argument.
   
   
Line 7: Line 8:
</p>
</p>
   
   
The methods in this class are listed at "[[List_of_InvalidRegex_methods|List of InvalidRegex methods]]".
<h2>The InvalidRegex methods</h2>
{{Template:List of InvalidRegex methods}}
 
The methods in the class are described in the subsections that follow. In addition:
<ul>
<li>[[Notation conventions for methods|"Notation conventions for methods"]] has information
about the conventions followed.
<li>[[InvalidRegex methods syntax|"InvalidRegex methods syntax"]] is a single page that contains the syntax diagrams of all the methods in the class.
</ul>
 
 
<h2>New constructor</h2>
 
[[Category:System exception classes]]
[[Category:System exception classes]]

Revision as of 15:42, 10 May 2011


The InvalidRegex exception class describes an exception associated with an invalid Regular Expression being passed to a method that takes a regular expression argument.

To produce an InvalidRegex exception yourself, you typically use a User Language Throw statement with an InvalidRegex New constructor. This statement must be issued from within a method, and it can only be caught by the code that calls the method. For example, the following statement throws an InvalidRegex exception with the position set to 13, the code set to 666, and the description indicating Bad luck:

throw %(invalidRegex):new(position=13, code=666, - description='Bad luck')

The InvalidRegex methods

The following are the available InvalidRegex class methods.

MethodDescription
CodeNumeric code indicating cause of the exception
DescriptionBrief description of the exception
NewCreate a new InvalidRegex object
PositionRegex position at or before which the error occurred

The methods in the class are described in the subsections that follow. In addition:


New constructor