forked from artyom-beilis/cppcms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcppcms_error.cpp
More file actions
31 lines (24 loc) · 926 Bytes
/
cppcms_error.cpp
File metadata and controls
31 lines (24 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
///////////////////////////////////////////////////////////////////////////////
#define CPPCMS_SOURCE
#include <cppcms/cppcms_error.h>
#include <cppcms/config.h>
#include <iostream>
#include <string.h>
#include <booster/system_error.h>
using namespace std;
namespace cppcms {
cppcms_error::cppcms_error(int err,std::string const &error) :
booster::runtime_error(error+":" + strerror(err))
{
}
std::string cppcms_error::strerror(int err)
{
return booster::system::error_code(err,booster::system::system_category).message();
}
}