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

📄 exception.cc

📁 C++ Reflection & Service Library
💻 CC
字号:
/* Reflection & Service Library * Copyright (C) 2003 Marcus Perlick * mailto: riffraff@users.sf.net *     * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. *  * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */#include "Exception.hh"#include <cstdio>#ifndef MPU_NO_IOSTREAM# include <iostream>#endifnamespace mpu {  const char RootException::CLASS_PATH_SEP = '/';  const char RootException::DOMAIN_NAME[] = "";  char RootException::msg_[ MSG_BUFFER_SIZE ];  RootException::RootException( int id, const char* fmt, ... ) :    id_( id )  {    va_list ap;        va_start( ap, fmt );    setMsg( fmt, ap );    va_end( ap );  }  void  RootException::setMsg( const char* fmt, va_list ap )  {    std::vsnprintf( msg_, MSG_BUFFER_SIZE, fmt, ap );  }  void  RootException::setMsg( const char* fmt, ... )  {    va_list ap;        va_start( ap, fmt );    setMsg( fmt, ap );    va_end( ap );  }    void  RootException::makePath( String& path ) const  {    path = CLASS_PATH_SEP;  }#ifndef MPU_NO_IOSTREAM  std::ostream&  operator<<( std::ostream& os, const RootException& x )  {    return os << x.getClassPath() << x.getId() << ':' << x.what();  }#endif  const char MPU_EXCEPTION_DOMAIN[] = "mpu";  } // namespace mpu

⌨️ 快捷键说明

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