1// excerpts from http://code.google.com/p/muduo/ 2// 3// Use of this source code is governed by a BSD-style license 4// that can be found in the License file. 5// 6// Author: Shuo Chen (giantchen at gmail dot com) 7 8#ifndef MUDUO_BASE_EXCEPTION_H 9#define MUDUO_BASE_EXCEPTION_H 10 11#include <exception> 12#include <string> 13 14namespace muduo 15{ 16 17class Exception : public std::exception 18{ 19 public: 20 explicit Exception(const char* what); 21 virtual ~Exception() throw(); 22 virtual const char* what() const throw(); 23 const char* stackTrace() const throw(); 24 25 private: 26 std::string message_; 27 std::string stack_; 28}; 29 30} 31 32#endif // MUDUO_BASE_EXCEPTION_H 33