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
|
/*
* Copyright (C) 2009 Codership Oy <info@codership.com>
*
*/
#include <cstring>
#include "Exception.hpp"
namespace gcache
{
Exception::Exception (const char* msg_str, int errno) throw()
: _errno(errno)
{
strncpy (msg, msg_str, EXCEPTION_MSG_SIZE);
msg[EXCEPTION_MSG_SIZE - 1] = '\0';
}
///*
Exception::Exception (const char* msg_str) throw()
: _errno(0)
{
strncpy (msg, msg_str, EXCEPTION_MSG_SIZE);
msg[EXCEPTION_MSG_SIZE - 1] = '\0';
}
//*/
}
|