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

📄 _exception_8h-source.html

📁 c++开发的一个不错的工具
💻 HTML
字号:
<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.h</h1><a href="_exception_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CPPUNIT_EXCEPTION_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_EXCEPTION_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include &lt;<a class="code" href="_portability_8h.html">cppunit/Portability.h</a>&gt;</span>00005 <span class="preprocessor">#include &lt;<a class="code" href="_message_8h.html">cppunit/Message.h</a>&gt;</span>00006 <span class="preprocessor">#include &lt;<a class="code" href="_source_line_8h.html">cppunit/SourceLine.h</a>&gt;</span>00007 <span class="preprocessor">#include &lt;exception&gt;</span>00008 00009 00010 <a class="code" href="_portability_8h.html#a6">CPPUNIT_NS_BEGIN</a>00011 00012 <a name="l00019"></a><a class="code" href="class_exception.html">00019</a> <span class="keyword">class </span>CPPUNIT_API Exception : <span class="keyword">public</span> std::exception00020 {00021 <span class="keyword">public</span>:00026   Exception( <span class="keyword">const</span> <a class="code" href="class_message.html">Message</a> &amp;message = <a class="code" href="class_message.html">Message</a>(), 00027              <span class="keyword">const</span> <a class="code" href="class_source_line.html">SourceLine</a> &amp;sourceLine = <a class="code" href="class_source_line.html">SourceLine</a>() );00028 00029 <span class="preprocessor">#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED</span>00030 <span class="preprocessor"></span>00033   Exception( std::string  message, 00034              <span class="keywordtype">long</span> lineNumber, 00035              std::string fileName );00036 <span class="preprocessor">#endif</span>00037 <span class="preprocessor"></span>00041   Exception( <span class="keyword">const</span> Exception &amp;other );00042 00044   <span class="keyword">virtual</span> ~Exception() <span class="keywordflow">throw</span>();00045 00047   Exception &amp;operator =( <span class="keyword">const</span> Exception &amp;other );00048 00050   <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>();00051 00053   <a class="code" href="class_source_line.html">SourceLine</a> sourceLine() <span class="keyword">const</span>;00054 00056   <a class="code" href="class_message.html">Message</a> message() <span class="keyword">const</span>;00057 00059   <span class="keywordtype">void</span> setMessage( <span class="keyword">const</span> <a class="code" href="class_message.html">Message</a> &amp;message );00060 00061 <span class="preprocessor">#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED</span>00062 <span class="preprocessor"></span>00063   <span class="keywordtype">long</span> lineNumber() <span class="keyword">const</span>;00064 00066   std::string fileName() <span class="keyword">const</span>;00067 00068   <span class="keyword">static</span> <span class="keyword">const</span> std::string UNKNOWNFILENAME;00069   <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">long</span> UNKNOWNLINENUMBER;00070 <span class="preprocessor">#endif</span>00071 <span class="preprocessor"></span>00073   <span class="keyword">virtual</span> Exception *clone() <span class="keyword">const</span>;00074 00075 <span class="keyword">protected</span>:00076   <span class="comment">// VC++ does not recognize call to parent class when prefixed</span>00077   <span class="comment">// with a namespace. This is a workaround.</span><a name="l00078"></a><a class="code" href="class_exception.html#x0">00078</a>   <span class="keyword">typedef</span> std::exception <a class="code" href="class_exception.html#x0">SuperClass</a>;00079 <a name="l00080"></a><a class="code" href="class_exception.html#p0">00080</a>   <a class="code" href="class_message.html">Message</a> m_message;<a name="l00081"></a><a class="code" href="class_exception.html#p1">00081</a>   <a class="code" href="class_source_line.html">SourceLine</a> m_sourceLine;<a name="l00082"></a><a class="code" href="class_exception.html#p2">00082</a>   std::string m_whatMessage;00083 };00084 00085 00086 <a class="code" href="_portability_8h.html#a7">CPPUNIT_NS_END</a>00087 00088 00089 <span class="preprocessor">#endif // CPPUNIT_EXCEPTION_H</span>00090 <span class="preprocessor"></span></div></pre><hr><table width="100%">  <tr>    <td width="10%" align="left" valign="center">      <a href="http://sourceforge.net">       <img      src="http://sourceforge.net/sflogo.php?group_id=11795"      width="88" height="31" border="0" alt="SourceForge Logo"></a>    </td>    <td width="20%" align="left" valign="center">      hosts this site.    </td>    <td>    </td>    <td align="right" valign="center">      Send comments to:<br>      <a href="mailto:cppunit-devel@lists.sourceforge.net">CppUnit Developers</a>    </td>  </tr></table></body> </html>

⌨️ 快捷键说明

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