~percona-dev/percona-xtradb-cluster/galera-2.x

« back to all changes in this revision

Viewing changes to gcache/src/pasture/Exception.cpp

  • Committer: Alex Yurchenko
  • Date: 2011-08-31 13:30:55 UTC
  • Revision ID: ayurchen@void-20110831133055-6t4oc4zjfvq07e8t
Synced with SVN branch 1.x r2335

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2009 Codership Oy <info@codership.com>
 
3
 *
 
4
 */
 
5
 
 
6
#include <cstring>
 
7
 
 
8
#include "Exception.hpp"
 
9
 
 
10
namespace gcache
 
11
{
 
12
    Exception::Exception (const char* msg_str, int errno) throw()
 
13
        : _errno(errno)
 
14
    {
 
15
        strncpy (msg, msg_str, EXCEPTION_MSG_SIZE);
 
16
        msg[EXCEPTION_MSG_SIZE - 1] = '\0';
 
17
    }
 
18
///*
 
19
    Exception::Exception (const char* msg_str) throw()
 
20
        : _errno(0)
 
21
    {
 
22
        strncpy (msg, msg_str, EXCEPTION_MSG_SIZE);
 
23
        msg[EXCEPTION_MSG_SIZE - 1] = '\0';
 
24
    }
 
25
//*/
 
26
}