ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
662 B

  1. #ifndef CPPCMS_ERROR_H
  2. #define CPPCMS_ERROR_H
  3. #include "defs.h"
  4. #include <string>
  5. #include <stdexcept>
  6. namespace cppcms {
  7. ///
  8. /// \brief Exception thrown by CppCMS framework.
  9. ///
  10. /// Every exception that is thrown from CppCMS modules derived from this exception.
  11. ///
  12. class CPPCMS_API cppcms_error : public std::runtime_error {
  13. std::string strerror(int err);
  14. public:
  15. ///
  16. /// Create an object with error code err (errno) and a message \a error
  17. ///
  18. cppcms_error(int err,std::string const &error);
  19. ///
  20. /// Create an object with message \a error
  21. ///
  22. cppcms_error(std::string const &error) : std::runtime_error(error) {};
  23. };
  24. }
  25. #endif /* _HTTP_ERROR_H */