libqi  1.14.5
qi/error.hpp
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
00003  * Use of this source code is governed by a BSD-style license that can be
00004  * found in the COPYING file.
00005  */
00006 
00011 #pragma once
00012 #ifndef _LIBQI_QI_ERROR_HPP_
00013 #define _LIBQI_QI_ERROR_HPP_
00014 
00015 # include <qi/macro.hpp>
00016 # include <qi/config.hpp>
00017 
00018 # include <stdexcept>
00019 # include <string>
00020 
00021 namespace qi {
00022   namespace os {
00023 
00024 #ifdef _MSC_VER
00025 # pragma warning( push )
00026 # pragma warning( disable : 4251 )
00027 // non dll-interface std::runtime_error used as base for dll-interface calss
00028 // qi::os::QiException
00029 # pragma warning( disable : 4275 )
00030 #endif
00031 
00036     class QI_API QI_API_DEPRECATED QiException : public std::runtime_error
00037     {
00038     public:
00039 
00047       explicit QiException(const std::string &message)
00048         : std::runtime_error(message)
00049       {}
00050 
00055       QiException(const QiException &e)
00056         : std::runtime_error(e.what())
00057       {}
00058 
00060       virtual ~QiException() throw()
00061       {}
00062 
00063 #ifdef _MSC_VER
00064 # pragma warning( pop )
00065 #endif
00066     };
00067   }
00068 }
00069 
00070 #endif  // _LIBQI_QI_ERROR_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines