PST SDK  5.0.1.0-acae3ae
TrackerExceptions.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2009-2018 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 {
26  class TrackerException : public std::runtime_error
27  {
28  std::string m_what;
29  std::string m_where;
30 
31  public:
32  TrackerException(const std::string& what);
33  TrackerException(const std::string& function, int line, const std::string& what);
34  virtual const char* where() const;
35  virtual std::string full_description() const;
36  };
37 
38 #define DECLARE_TRACKER_EXCEPTION( name ) \
39  class name : public PSTech::TrackerException \
40  { \
41  public: \
42  name(const std::string& what) : PSTech::TrackerException(what) {} \
43  name(const std::string& function, int line, const std::string& what) : PSTech::TrackerException(function, line, what) {}\
44  }
45 
54 }
55 #endif //TRACKER_EXCEPTIONS_H
Definition: pst-sdk.h:31
Definition: TrackerExceptions.h:50
Definition: TrackerExceptions.h:53
Definition: TrackerExceptions.h:52
Generic tracker exception.
Definition: TrackerExceptions.h:26
#define DECLARE_TRACKER_EXCEPTION(name)
Definition: TrackerExceptions.h:38
Definition: TrackerExceptions.h:51
virtual std::string full_description() const
std::string m_what
Definition: TrackerExceptions.h:28
std::string m_where
Definition: TrackerExceptions.h:29
virtual const char * where() const
Definition: TrackerExceptions.h:48
Definition: TrackerExceptions.h:47
Definition: TrackerExceptions.h:46
TrackerException(const std::string &what)
Definition: TrackerExceptions.h:49