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