/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */ /* $Id: cmnExceptionBase.h,v 1.6 2007/04/26 19:33:57 anton Exp $ Author(s): Ankur Kapoor Created on: 2003-06-25 (C) Copyright 2003-2007 Johns Hopkins University (JHU), All Rights Reserved. --- begin cisst license - do not edit --- This software is provided "as is" under an open source license, with no warranty. The complete license can be found in license.txt and http://www.cisst.org/cisst/license.txt. --- end cisst license --- */ /*! \file \brief Declaration of cmnExceptionBase */ #ifndef _cmnExceptionBase_h #define _cmnExceptionBase_h #include #include #include class cmnExceptionBase : public std::exception { public: cmnExceptionBase (const cmnErrorCodeBase &errorCode, const char userMessage[] = "") : ErrorCode (errorCode), UserMessage(userMessage) {} ~cmnExceptionBase () throw() {} const char *what() const throw() { std::string debug = ""; return debug.c_str(); } cmnErrorCodeBase WhatErrorCode() const throw() { return ErrorCode; } private: cmnErrorCodeBase ErrorCode; std::string UserMessage; }; #endif // _cmnExceptionBase_h // **************************************************************************** // Change History // **************************************************************************** // // $Log: cmnExceptionBase.h,v $ // Revision 1.6 2007/04/26 19:33:57 anton // All files in libraries: Applied new license text, separate copyright and // updated dates, added standard header where missing. // // Revision 1.5 2006/11/20 20:33:19 anton // Licensing: Applied new license to cisstCommon, cisstVector, cisstNumerical, // cisstInteractive, cisstImage and cisstOSAbstraction. // // Revision 1.4 2005/09/26 15:41:46 anton // cisst: Added modelines for emacs and vi. // // Revision 1.3 2005/05/19 19:29:00 anton // cisst libs: Added the license to cisstCommon and cisstVector // // Revision 1.2 2004/10/25 13:52:05 anton // Doxygen documentation: Cleanup all the useless \ingroup. // // Revision 1.1 2003/11/14 22:05:36 anton // Added to repository for testing // // // ****************************************************************************