⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_exception.html

📁 c++开发的一个不错的工具
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><title>CppUnit - The Unit Testing Library</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"> <table width="100%">  <tr>    <td width="40%" align="left" valign="center">      <a href="http://sourceforge.net/projects/cppunit">      CppUnit project page      </a>    </td>    <td>      <a href="FAQ">FAQ</a>    </td>    <td width="40%" align="right" valign="center">      <a href="http://cppunit.sourceforge.net">CppUnit home page</a>    </td>  </tr></table><hr><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>Exception Class Reference<br><small>[<a class="el" href="group___browsing_collected_test_result.html">Browsing collected test result</a>]</small></h1>Exceptions thrown by failed assertions.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="_exception_8h-source.html">Exception.h</a>&gt;</code><p><a href="class_exception-members.html">List of all members.</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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a0">Exception</a> (const <a class="el" href="class_message.html">Message</a> &amp;message=<a class="el" href="class_message.html">Message</a>(), const <a class="el" href="class_source_line.html">SourceLine</a> &amp;sourceLine=<a class="el" href="class_source_line.html">SourceLine</a>())</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs the exception with the specified message and source location.  <a href="#a0"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a1">Exception</a> (const <a class="el" href="class_exception.html">Exception</a> &amp;other)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a copy of an exception.  <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a2">~Exception</a> ()  throw ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructs the exception.  <a href="#a2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class_exception.html">Exception</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a3">operator=</a> (const <a class="el" href="class_exception.html">Exception</a> &amp;other)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs an assignment.  <a href="#a3"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a4">what</a> () const  throw ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns descriptive message.  <a href="#a4"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class_source_line.html">SourceLine</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a5">sourceLine</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Location where the error occured.  <a href="#a5"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class_message.html">Message</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a6">message</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="class_message.html">Message</a> related to the exception.  <a href="#a6"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a7">setMessage</a> (const <a class="el" href="class_message.html">Message</a> &amp;message)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the message.  <a href="#a7"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="class_exception.html">Exception</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#a8">clone</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clones the exception.  <a href="#a8"></a><br><br></td></tr><tr><td colspan=2><br><h2>Protected Types</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::exception&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#x0">SuperClass</a></td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class_message.html">Message</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#p0">m_message</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class_source_line.html">SourceLine</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#p1">m_sourceLine</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_exception.html#p2">m_whatMessage</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Exceptions thrown by failed assertions. <p>Exception is an exception that serves descriptive strings through its what() method <p><hr><h2>Member Typedef Documentation</h2><a class="anchor" name="x0" doxytag="Exception::SuperClass" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> typedef std::exception <a class="el" href="class_exception.html#x0">Exception::SuperClass</a><code> [protected]</code>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="Exception::Exception" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Exception::Exception           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_message.html">Message</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>message</em> = <code><a class="el" href="class_message.html">Message</a>()</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="class_source_line.html">SourceLine</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>sourceLine</em> = <code><a class="el" href="class_source_line.html">SourceLine</a>()</code></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Constructs the exception with the specified message and source location. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>message</em>&nbsp;</td><td><a class="el" href="class_message.html">Message</a> associated to the exception. </td></tr>    <tr><td></td><td valign=top><em>sourceLine</em>&nbsp;</td><td>Source location related to the exception. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a1" doxytag="Exception::Exception" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> CPPUNIT_NS_BEGIN Exception::Exception           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_exception.html">Exception</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>other</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Constructs a copy of an exception. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>other</em>&nbsp;</td><td>Exception to copy. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a2" doxytag="Exception::~Exception" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Exception::~<a class="el" href="class_exception.html">Exception</a>           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>  throw ()<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Destructs the exception. <p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a8" doxytag="Exception::clone" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="class_exception.html">Exception</a> * Exception::clone           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Clones the exception. <p>    </td>  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -