00001 /* 00002 oscpack -- Open Sound Control packet manipulation library 00003 http://www.audiomulch.com/~rossb/oscpack 00004 00005 Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com> 00006 00007 Permission is hereby granted, free of charge, to any person obtaining 00008 a copy of this software and associated documentation files 00009 (the "Software"), to deal in the Software without restriction, 00010 including without limitation the rights to use, copy, modify, merge, 00011 publish, distribute, sublicense, and/or sell copies of the Software, 00012 and to permit persons to whom the Software is furnished to do so, 00013 subject to the following conditions: 00014 00015 The above copyright notice and this permission notice shall be 00016 included in all copies or substantial portions of the Software. 00017 00018 Any person wishing to distribute modifications to the Software is 00019 requested to send the modifications to the original developer so that 00020 they can be incorporated into the canonical version. 00021 00022 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00023 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00024 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00025 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 00026 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00027 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00028 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00029 */ 00030 #ifndef INCLUDED_OSC_EXCEPTION_H 00031 #define INCLUDED_OSC_EXCEPTION_H 00032 00033 #include <exception> 00034 00035 namespace osc{ 00036 00037 class Exception : public std::exception { 00038 const char *what_; 00039 00040 public: 00041 Exception() throw() {} 00042 Exception( const Exception& src ) throw() 00043 : what_( src.what_ ) {} 00044 Exception( const char *w ) throw() 00045 : what_( w ) {} 00046 Exception& operator=( const Exception& src ) throw() 00047 { what_ = src.what_; return *this; } 00048 virtual ~Exception() throw() {} 00049 virtual const char* what() const throw() { return what_; } 00050 }; 00051 00052 } // namespace osc 00053 00054 #endif /* INCLUDED_OSC_EXCEPTION_H */