blob: 81f78f7b0bdc3c866edbbc61ee9f429c1675739a (
plain)
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
32
33
34
35
36
37
38
39
|
/*
* CommException.cpp
*
* Copyright (C) ST-Ericsson SA 2011
* Authors: Srimanta Panda <srimanta.panda@stericsson.com>,
* Ola Borgelin <ola.borgelin@stericsson.com>,
* Karin Hedlund <karin.hedlund@stericsson.com>,
* Markus Andersson <markus.m.andersson@stericsson.com> for ST-Ericsson.
* License terms: 3-clause BSD license
*
*/
#include "stdafx.h"
#include "CommException.h"
#include <stdexcept>
#include <sstream>
using namespace std;
CommException::CommException(const string& message, DeviceStatus_t error):
runtime_error(message), error_(error)
{
}
CommException::~CommException() throw()
{
}
const char* CommException::what()
{
ostringstream message;
message << this->runtime_error::what() << " " << error_;
message_ = message.str();
return message_.c_str();
}
DeviceStatus_t CommException::getError()
{
return error_;
}
|