exception_8h-source.html
来自「一个功能强大的内存数据库源代码,c++编写,有详细的注释」· HTML 代码 · 共 68 行
HTML
68 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>exception.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.15 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center><hr><h1>exception.h</h1><div class="fragment"><pre>00001 <font class="comment">//-< EXCEPTION.H >---------------------------------------------------*--------*</font>00002 <font class="comment">// FastDB Version 1.0 (c) 1999 GARRET * ? *</font>00003 <font class="comment">// (Main Memory Database Management System) * /\| *</font>00004 <font class="comment">// * / \ *</font>00005 <font class="comment">// Created: 3-Oct-99 Sebastiano Suraci * / [] \ *</font>00006 <font class="comment">// Last update: 5-Oct-99 K.A. Knizhnik * GARRET *</font>00007 <font class="comment">//-------------------------------------------------------------------*--------*</font>00008 <font class="comment">// Database exception </font>00009 <font class="comment">//-------------------------------------------------------------------*--------*</font>00010 00011 <font class="preprocessor">#ifndef __EXCEPTION_H__</font>00012 <font class="preprocessor"></font><font class="preprocessor">#define __EXCEPTION_H__</font>00013 <font class="preprocessor"></font>00014 <font class="keyword">class </font>FASTDB_DLL_ENTRY dbException 00015 {00016 <font class="keyword">protected</font>:00017 <font class="keywordtype">int</font> err_code;00018 <font class="keywordtype">char</font>* msg; 00019 <font class="keywordtype">int</font> arg;00020 00021 <font class="keyword">public</font>:00022 dbException(<font class="keywordtype">int</font> p_err_code, <font class="keywordtype">char</font> <font class="keyword">const</font>* p_msg = NULL, <font class="keywordtype">int</font> p_arg = 0)00023 : err_code (p_err_code),00024 msg (NULL),00025 arg (p_arg)00026 { 00027 <font class="keywordflow">if</font> (p_msg != NULL) { 00028 msg = <font class="keyword">new</font> <font class="keywordtype">char</font>[strlen(p_msg)+1]; 00029 strcpy(msg, p_msg);00030 }00031 }00032 00033 dbException(dbException <font class="keyword">const</font>& ex) { 00034 err_code = ex.err_code;00035 arg = ex.arg;00036 <font class="keywordflow">if</font> (ex.msg != NULL) { 00037 msg = <font class="keyword">new</font> <font class="keywordtype">char</font>[strlen(ex.msg)+1]; 00038 strcpy(msg, ex.msg);00039 } <font class="keywordflow">else</font> { 00040 msg = NULL;00041 }00042 } 00043 00044 ~dbException() { 00045 <font class="keyword">delete</font>[] msg;00046 }00047 00048 <font class="keywordtype">int</font> getErrCode()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> err_code; }00049 <font class="keywordtype">char</font>* getMsg()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> msg; }00050 <font class="keywordtype">long</font> getArg()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> arg; }00051 };00052 00053 <font class="preprocessor">#endif</font></pre></div><hr><address align="right"><small>Generated on Fri Nov 15 21:06:29 2002 for FastDB by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?