Exception.hpp
Go to the documentation of this file.
00001 // ========================================================================================
00002 //  ApproxMVBB
00003 //  Copyright (C) 2014 by Gabriel Nützi <nuetzig (at) imes (d0t) mavt (d0t) ethz (døt) ch>
00004 //
00005 //  This Source Code Form is subject to the terms of the Mozilla Public
00006 //  License, v. 2.0. If a copy of the MPL was not distributed with this
00007 //  file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008 // ========================================================================================
00009 
00010 #ifndef ApproxMVBB_Common_Exception_hpp
00011 #define ApproxMVBB_Common_Exception_hpp
00012 
00013 #include <stdexcept>
00014 #include <exception>
00015 #include <string>
00016 #include <sstream>
00017 
00018 namespace ApproxMVBB{
00019     class Exception : public std::runtime_error {
00020     public:
00021         Exception(const std::stringstream & ss): std::runtime_error(ss.str()){}
00022     private:
00023 
00024     };
00025 }
00026 
00027 #define ApproxMVBB_THROWEXCEPTION( message ) {std::stringstream ___s___ ; ___s___ << message << std::endl << " @ " << __FILE__ << " (" << __LINE__ << ")" << std::endl; throw ApproxMVBB::Exception(___s___);}
00028 
00029 
00030 
00031 #endif // Exception_hpp


asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Sat Jun 8 2019 20:21:49