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

📄 exception.h

📁 一个功能强大的内存数据库源代码,c++编写,有详细的注释
💻 H
字号:
//-< EXCEPTION.H >---------------------------------------------------*--------*// FastDB                    Version 1.0         (c) 1999  GARRET    *     ?  *// (Main Memory Database Management System)                          *   /\|  *//                                                                   *  /  \  *//                          Created:     3-Oct-99 Sebastiano Suraci  * / [] \ *//                          Last update: 5-Oct-99 K.A. Knizhnik      * GARRET *//-------------------------------------------------------------------*--------*// Database exception //-------------------------------------------------------------------*--------*#ifndef __EXCEPTION_H__#define __EXCEPTION_H__class FASTDB_DLL_ENTRY dbException  {   protected:     int   err_code;     char* msg;	     int   arg;   public:     dbException(int p_err_code, char const* p_msg = NULL, int p_arg = 0)     : err_code (p_err_code),       msg (NULL),       arg (p_arg)     {          if (p_msg != NULL) { 	     msg = new char[strlen(p_msg)+1]; 	     strcpy(msg, p_msg);	 }     }     dbException(dbException const& ex) { 	 err_code = ex.err_code;	 arg = ex.arg;         if (ex.msg != NULL) { 	     msg = new char[strlen(ex.msg)+1]; 	     strcpy(msg, ex.msg);	 } else { 	     msg = NULL;	 }     }	     ~dbException() {          delete[] msg;     }     int   getErrCode() const { return err_code; }     char* getMsg() const     { return msg; }     long  getArg() const     { return arg; }};#endif

⌨️ 快捷键说明

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