Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 5389723cfaa070fa83dde30f5cb260be > files > 128

compat-guichan05-devel-0.5.0-11.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Guichan: gcn::Exception Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespacegcn.html">gcn</a>::<a class="el" href="classgcn_1_1Exception.html">Exception</a></div>
<h1>gcn::Exception Class Reference</h1><!-- doxytag: class="gcn::Exception" --><code>#include &lt;<a class="el" href="exception_8hpp-source.html">exception.hpp</a>&gt;</code>
<p>
<a href="classgcn_1_1Exception-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
An exception containing a message, a file and a line number. 
<p>
Guichan will only throw exceptions of this class. You can use this class for your own exceptions. A nifty feature of the excpetion class is that it can tell you from which line and file it was thrown. To make things easier when throwing exceptions there exists a macro for creating exceptions which automatically sets the filename and line number.<p>
EXAMPLE:<div class="fragment"><pre class="fragment">          <span class="keywordflow">throw</span> GCN_EXCEPTION(<span class="stringliteral">"my error message"</span>);
</pre></div> 
<p>

<p>
Definition at line <a class="el" href="exception_8hpp-source.html#l00098">98</a> of file <a class="el" href="exception_8hpp-source.html">exception.hpp</a>.<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6c412a3c4d4f1727b8c847b5dd63bf2"></a><!-- doxytag: member="gcn::Exception::Exception" ref="c6c412a3c4d4f1727b8c847b5dd63bf2" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#c6c412a3c4d4f1727b8c847b5dd63bf2">Exception</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#4f475350e88e0538f51ec91fb357c729">Exception</a> (const std::string &amp;message)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#4f475350e88e0538f51ec91fb357c729"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#c3bae5d8753050442871681b59b63773">Exception</a> (const std::string &amp;message, const std::string &amp;function, const std::string &amp;filename, int line)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#c3bae5d8753050442871681b59b63773"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#c409ab0094bd0e9e341f01a532e2fe96">getFunction</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the function name in which the exception was thrown.  <a href="#c409ab0094bd0e9e341f01a532e2fe96"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#7c1ca793f383c6dd92eb7fb1694260de">getMessage</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the error message of the exception.  <a href="#7c1ca793f383c6dd92eb7fb1694260de"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#7918049e3407ace4a59361c1a29b81ac">getFilename</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the filename in which the exceptions was thrown.  <a href="#7918049e3407ace4a59361c1a29b81ac"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#93a217b190df8d70405e9feb09c18c00">getLine</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the line number of the line where the exception was thrown.  <a href="#93a217b190df8d70405e9feb09c18c00"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c4cecdef532e30f82d9095789732cfaa"></a><!-- doxytag: member="gcn::Exception::mFunction" ref="c4cecdef532e30f82d9095789732cfaa" args="" -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#c4cecdef532e30f82d9095789732cfaa">mFunction</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1337ec9291e5587eb2a544212aaa1355"></a><!-- doxytag: member="gcn::Exception::mMessage" ref="1337ec9291e5587eb2a544212aaa1355" args="" -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#1337ec9291e5587eb2a544212aaa1355">mMessage</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="698a27a1b9d2fba424141d228f5a97a0"></a><!-- doxytag: member="gcn::Exception::mFilename" ref="698a27a1b9d2fba424141d228f5a97a0" args="" -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#698a27a1b9d2fba424141d228f5a97a0">mFilename</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aac5868e205d6e89d1546e18ac244daf"></a><!-- doxytag: member="gcn::Exception::mLine" ref="aac5868e205d6e89d1546e18ac244daf" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1Exception.html#aac5868e205d6e89d1546e18ac244daf">mLine</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="4f475350e88e0538f51ec91fb357c729"></a><!-- doxytag: member="gcn::Exception::Exception" ref="4f475350e88e0538f51ec91fb357c729" args="(const std::string &amp;message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcn::Exception::Exception           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>message</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>the error message. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="exception_8cpp-source.html#l00070">70</a> of file <a class="el" href="exception_8cpp-source.html">exception.cpp</a>.
<p>
References <a class="el" href="exception_8hpp-source.html#l00159">mMessage</a>.
</div>
</div><p>
<a class="anchor" name="c3bae5d8753050442871681b59b63773"></a><!-- doxytag: member="gcn::Exception::Exception" ref="c3bae5d8753050442871681b59b63773" args="(const std::string &amp;message, const std::string &amp;function, const std::string &amp;filename, int line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcn::Exception::Exception           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>line</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
NOTE: Don't use this constructor. Use the GCN_EXCEPTION macro instead.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>the error message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>function</em>&nbsp;</td><td>the function name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>the name of the file. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>line</em>&nbsp;</td><td>the line number. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="exception_8cpp-source.html#l00075">75</a> of file <a class="el" href="exception_8cpp-source.html">exception.cpp</a>.
<p>
References <a class="el" href="exception_8hpp-source.html#l00160">mFilename</a>, <a class="el" href="exception_8hpp-source.html#l00158">mFunction</a>, <a class="el" href="exception_8hpp-source.html#l00161">mLine</a>, and <a class="el" href="exception_8hpp-source.html#l00159">mMessage</a>.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="7918049e3407ace4a59361c1a29b81ac"></a><!-- doxytag: member="gcn::Exception::getFilename" ref="7918049e3407ace4a59361c1a29b81ac" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; gcn::Exception::getFilename           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the filename in which the exceptions was thrown. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the filename in which the exception was thrown. </dd></dl>

<p>
Definition at line <a class="el" href="exception_8cpp-source.html#l00096">96</a> of file <a class="el" href="exception_8cpp-source.html">exception.cpp</a>.
<p>
References <a class="el" href="exception_8hpp-source.html#l00160">mFilename</a>.
</div>
</div><p>
<a class="anchor" name="c409ab0094bd0e9e341f01a532e2fe96"></a><!-- doxytag: member="gcn::Exception::getFunction" ref="c409ab0094bd0e9e341f01a532e2fe96" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; gcn::Exception::getFunction           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the function name in which the exception was thrown. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the function name in which the exception was thrown. </dd></dl>

<p>
Definition at line <a class="el" href="exception_8cpp-source.html#l00086">86</a> of file <a class="el" href="exception_8cpp-source.html">exception.cpp</a>.
<p>
References <a class="el" href="exception_8hpp-source.html#l00158">mFunction</a>.
</div>
</div><p>
<a class="anchor" name="93a217b190df8d70405e9feb09c18c00"></a><!-- doxytag: member="gcn::Exception::getLine" ref="93a217b190df8d70405e9feb09c18c00" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int gcn::Exception::getLine           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the line number of the line where the exception was thrown. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the line number of the line where the exception was thrown. </dd></dl>

<p>
Definition at line <a class="el" href="exception_8cpp-source.html#l00101">101</a> of file <a class="el" href="exception_8cpp-source.html">exception.cpp</a>.
<p>
References <a class="el" href="exception_8hpp-source.html#l00161">mLine</a>.
</div>
</div><p>
<a class="anchor" name="7c1ca793f383c6dd92eb7fb1694260de"></a><!-- doxytag: member="gcn::Exception::getMessage" ref="7c1ca793f383c6dd92eb7fb1694260de" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; gcn::Exception::getMessage           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the error message of the exception. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the error message. </dd></dl>

<p>
Definition at line <a class="el" href="exception_8cpp-source.html#l00091">91</a> of file <a class="el" href="exception_8cpp-source.html">exception.cpp</a>.
<p>
References <a class="el" href="exception_8hpp-source.html#l00159">mMessage</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="exception_8hpp-source.html">exception.hpp</a><li><a class="el" href="exception_8cpp-source.html">exception.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sat Jul 29 19:38:48 2006 for Guichan by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>