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

📄 pionexception.hpp

📁 用c++编写http server的源码库,对socket等网络处理的代码可迅速转为己用.
💻 HPP
字号:
// -----------------------------------------------------------------// libpion: a C++ framework for building lightweight HTTP interfaces// -----------------------------------------------------------------// Copyright (C) 2007 Atomic Labs, Inc.  (http://www.atomiclabs.com)//// Distributed under the Boost Software License, Version 1.0.// See accompanying file COPYING or copy at http://www.boost.org/LICENSE_1_0.txt//#ifndef __PION_PIONEXCEPTION_HEADER__#define __PION_PIONEXCEPTION_HEADER__#include <libpion/PionConfig.hpp>#include <exception>#include <string>namespace pion {	// begin namespace pion////// PionException: basic exception class that defines a what() function///class PionException :	public std::exception{public:	// virtual destructor does not throw	virtual ~PionException() throw () {}	// constructors used for constant messages	PionException(const char *what_msg) : m_what_msg(what_msg) {}	PionException(const std::string& what_msg) : m_what_msg(what_msg) {}		// constructors used for messages with a parameter	PionException(const char *description, const std::string& param)		: m_what_msg(std::string(description) + param) {}	PionException(std::string description, const std::string& param)		: m_what_msg(description + param) {}	/// returns a desciptive message for the exception	virtual const char* what() const throw() {		return m_what_msg.c_str();	}	private:		// message returned by what() function	const std::string	m_what_msg;};}	// end namespace pion#endif

⌨️ 快捷键说明

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