1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Struct regex_error</title> 6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.regex_error_hpp" title="Header <boost/xpressive/regex_error.hpp>"> 10<link rel="prev" href="regex_constants/error_type.html" title="Type error_type"> 11<link rel="next" href="../../BOOST_XPR_ENSURE_.html" title="Macro BOOST_XPR_ENSURE_"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 16<td align="center"><a href="../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="regex_constants/error_type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_error_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../BOOST_XPR_ENSURE_.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.xpressive.regex_error"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Struct regex_error</span></h2> 30<p>boost::xpressive::regex_error — The class <a class="link" href="regex_error.html" title="Struct regex_error">regex_error</a> defines the type of objects thrown as exceptions to report errors during the conversion from a string representing a regular expression to a finite state machine. </p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../xpressive/reference.html#header.boost.xpressive.regex_error_hpp" title="Header <boost/xpressive/regex_error.hpp>">boost/xpressive/regex_error.hpp</a>> 34 35</span> 36<span class="keyword">struct</span> <a class="link" href="regex_error.html" title="Struct regex_error">regex_error</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span>, <span class="keyword">public</span> <span class="identifier">exception</span> <span class="special">{</span> 37 <span class="comment">// <a class="link" href="regex_error.html#boost.xpressive.regex_errorconstruct-copy-destruct">construct/copy/destruct</a></span> 38 <span class="keyword">explicit</span> <a class="link" href="regex_error.html#id-1_3_47_5_7_2_1_1_5-bb"><span class="identifier">regex_error</span></a><span class="special">(</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span><span class="special">,</span> <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">=</span> <span class="string">""</span><span class="special">)</span><span class="special">;</span> 39 <a class="link" href="regex_error.html#id-1_3_47_5_7_2_1_1_6-bb"><span class="special">~</span><span class="identifier">regex_error</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 40 41 <span class="comment">// <a class="link" href="regex_error.html#id-1_3_47_5_7_2_1_1_4-bb">public member functions</a></span> 42 <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <a class="link" href="regex_error.html#id-1_3_47_5_7_2_1_1_4_1-bb"><span class="identifier">code</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 43<span class="special">}</span><span class="special">;</span></pre></div> 44<div class="refsect1"> 45<a name="id-1.3.47.5.8.5.4"></a><h2>Description</h2> 46<div class="refsect2"> 47<a name="id-1.3.47.5.8.5.4.2"></a><h3> 48<a name="boost.xpressive.regex_errorconstruct-copy-destruct"></a><code class="computeroutput">regex_error</code> 49 public 50 construct/copy/destruct</h3> 51<div class="orderedlist"><ol class="orderedlist" type="1"> 52<li class="listitem"> 53<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_47_5_7_2_1_1_5-bb"></a><span class="identifier">regex_error</span><span class="special">(</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> code<span class="special">,</span> <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> str <span class="special">=</span> <span class="string">""</span><span class="special">)</span><span class="special">;</span></pre> 54<p>Constructs an object of class <code class="computeroutput"><a class="link" href="regex_error.html" title="Struct regex_error">regex_error</a></code>. 55 56</p> 57<div class="variablelist"><table border="0" class="variablelist compact"> 58<colgroup> 59<col align="left" valign="top"> 60<col> 61</colgroup> 62<tbody> 63<tr> 64<td><p><span class="term">Parameters:</span></p></td> 65<td><div class="variablelist"><table border="0" class="variablelist compact"> 66<colgroup> 67<col align="left" valign="top"> 68<col> 69</colgroup> 70<tbody> 71<tr> 72<td><p><span class="term"><code class="computeroutput">code</code></span></p></td> 73<td><p>The error_type this <code class="computeroutput"><a class="link" href="regex_error.html" title="Struct regex_error">regex_error</a></code> represents. </p></td> 74</tr> 75<tr> 76<td><p><span class="term"><code class="computeroutput">str</code></span></p></td> 77<td><p>The message string of this <code class="computeroutput"><a class="link" href="regex_error.html" title="Struct regex_error">regex_error</a></code>. </p></td> 78</tr> 79</tbody> 80</table></div></td> 81</tr> 82<tr> 83<td><p><span class="term">Postconditions:</span></p></td> 84<td><p>code() == code </p></td> 85</tr> 86</tbody> 87</table></div> 88</li> 89<li class="listitem"> 90<pre class="literallayout"><a name="id-1_3_47_5_7_2_1_1_6-bb"></a><span class="special">~</span><span class="identifier">regex_error</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> 91<p>Destructor for class <code class="computeroutput"><a class="link" href="regex_error.html" title="Struct regex_error">regex_error</a></code> 92</p> 93<div class="variablelist"><table border="0" class="variablelist compact"> 94<colgroup> 95<col align="left" valign="top"> 96<col> 97</colgroup> 98<tbody><tr> 99<td><p><span class="term">Throws:</span></p></td> 100<td>Will not throw.</td> 101</tr></tbody> 102</table></div> 103</li> 104</ol></div> 105</div> 106<div class="refsect2"> 107<a name="id-1.3.47.5.8.5.4.3"></a><h3> 108<a name="id-1_3_47_5_7_2_1_1_4-bb"></a><code class="computeroutput">regex_error</code> public member functions</h3> 109<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 110<pre class="literallayout"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <a name="id-1_3_47_5_7_2_1_1_4_1-bb"></a><span class="identifier">code</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 111<p>Accessor for the error_type value 112 113</p> 114<div class="variablelist"><table border="0" class="variablelist compact"> 115<colgroup> 116<col align="left" valign="top"> 117<col> 118</colgroup> 119<tbody> 120<tr> 121<td><p><span class="term">Returns:</span></p></td> 122<td><p>the error_type code passed to the constructor </p></td> 123</tr> 124<tr> 125<td><p><span class="term">Throws:</span></p></td> 126<td>Will not throw.</td> 127</tr> 128</tbody> 129</table></div> 130</li></ol></div> 131</div> 132</div> 133</div> 134<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 135<td align="left"></td> 136<td align="right"><div class="copyright-footer">Copyright © 2007 Eric Niebler<p> 137 Distributed under the Boost Software License, Version 1.0. (See accompanying 138 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 139 </p> 140</div></td> 141</tr></table> 142<hr> 143<div class="spirit-nav"> 144<a accesskey="p" href="regex_constants/error_type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_error_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../BOOST_XPR_ENSURE_.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 145</div> 146</body> 147</html> 148