PST SDK  5.0.3.0-7c6cbb9
TrackerExceptions.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2009-2019 PS-Tech B.V.
4 * Falckstraat 53 hs, NL-1017 VV, Amsterdam, the Netherlands.
5 * All rights reserved.
6 *
7 * This software is the confidential and proprietary information of Personal
8 * Space Technologies, Inc. ("Confidential Information"). You shall not
9 * disclose such Confidential Information and shall use it only in
10 * accordance with the terms of the license agreement you entered into
11 * with Personal Space Technologies.
12 */
13 
14 #ifndef TRACKER_EXCEPTIONS_H
15 #define TRACKER_EXCEPTIONS_H
16 
17 #include <string>
18 
19 namespace PSTech
20 {
30  class TrackerException : public std::runtime_error
31  {
32  std::string m_what;
33  std::string m_where;
34 
35  public:
36  TrackerException(const std::string& what);
37  TrackerException(const std::string& function, int line, const std::string& what);
38  virtual const char* where() const;
39  virtual std::string full_description() const;
40  };
41 
42 #define DECLARE_TRACKER_EXCEPTION( name ) \
43  class name : public PSTech::TrackerException \
44  { \
45  public: \
46  name(const std::string& what) : PSTech::TrackerException(what) {} \
47  name(const std::string& function, int line, const std::string& what) : PSTech::TrackerException(function, line, what) {}\
48  }
49 
58 }
59 #endif //TRACKER_EXCEPTIONS_H
Definition: pst-sdk.h:31
Definition: TrackerExceptions.h:54
Definition: TrackerExceptions.h:57
Definition: TrackerExceptions.h:56
Generic tracker exception.
Definition: TrackerExceptions.h:30
#define DECLARE_TRACKER_EXCEPTION(name)
Definition: TrackerExceptions.h:42
Definition: TrackerExceptions.h:55
virtual std::string full_description() const
std::string m_what
Definition: TrackerExceptions.h:32
std::string m_where
Definition: TrackerExceptions.h:33
virtual const char * where() const
Definition: TrackerExceptions.h:52
Definition: TrackerExceptions.h:51
Definition: TrackerExceptions.h:50
TrackerException(const std::string &what)
Definition: TrackerExceptions.h:53