forked from artyom-beilis/cppcms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcppcms_error_category.cpp
More file actions
28 lines (26 loc) · 904 Bytes
/
cppcms_error_category.cpp
File metadata and controls
28 lines (26 loc) · 904 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
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
///////////////////////////////////////////////////////////////////////////////
#include "cppcms_error_category.h"
namespace cppcms {
namespace impl {
char const *error_category::name() const noexcept
{
return "cppcms::io";
}
std::string error_category::message(int cat) const
{
switch(cat) {
case errc::ok: return "ok";
case errc::protocol_violation: return "protocol violation";
default:
return "unknown";
}
}
const error_category cppcms_category = error_category();
} // impl
} // cppcms