PST SDK  5.1.0.0-e242fa9
TrackerExceptions.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2009-2020 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
PSTech::TrackerException::where
virtual const char * where() const
DECLARE_TRACKER_EXCEPTION
#define DECLARE_TRACKER_EXCEPTION(name)
Definition: TrackerExceptions.h:42
PSTech::InvalidDataException
Definition: TrackerExceptions.h:50
PSTech::IOException
Definition: TrackerExceptions.h:53
PSTech::TrackerException::m_what
std::string m_what
Definition: TrackerExceptions.h:32
PSTech::OutOfRangeException
Definition: TrackerExceptions.h:54
PSTech::TrackerException::m_where
std::string m_where
Definition: TrackerExceptions.h:33
PSTech::NotInitializedException
Definition: TrackerExceptions.h:56
PSTech::NotSupportedException
Definition: TrackerExceptions.h:55
PSTech::TrackerException::TrackerException
TrackerException(const std::string &what)
PSTech::AlreadyExistsException
Definition: TrackerExceptions.h:52
PSTech::HttpException
Definition: TrackerExceptions.h:57
PSTech
Definition: pst-sdk.h:31
PSTech::TrackerException::full_description
virtual std::string full_description() const
PSTech::TrackerException
Generic tracker exception.
Definition: TrackerExceptions.h:30
PSTech::NotFoundException
Definition: TrackerExceptions.h:51