source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/Helper/Exceptions.h @ 35

Last change on this file since 35 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 975 bytes
Line 
1/**
2 * @file Exceptions.h
3 * Provides specific exceptions.
4 * @author Yann garcia
5 * @version 1.0
6 * @date 25/07/2009
7 */
8
9#ifndef STF_370_Exceptions
10#define STF_370_Exceptions
11
12// standard exceptions
13#include <iostream>
14#include <string>
15#include <exception>
16
17class LowerTestAdapterException: public std::exception
18{
19private:
20  std::string m_message;
21
22public:
23  LowerTestAdapterException(const char* message)
24  {
25          m_message.assign(message);
26  }
27  ~LowerTestAdapterException() throw() {};
28
29  virtual const char* what() const throw()
30  {
31    return m_message.c_str();
32  }
33};
34
35class UpperTestAdapterException: public std::exception
36{
37private:
38  std::string m_message;
39
40public:
41  UpperTestAdapterException(const char* message)
42  {
43          m_message.assign(message);
44  }
45  ~UpperTestAdapterException() throw() {};
46
47  virtual const char* what() const throw()
48  {
49    return m_message.c_str();
50  }
51};
52
53#endif // STF_370_Exceptions
Note: See TracBrowser for help on using the repository browser.