/* -*- 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: cmnErrorCodeBase.h,v 1.6 2007/04/26 19:33:57 anton Exp $ Author(s): Ankur Kapoor Created on: 2003-06-2 (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 cmnErrorCodeBase */ #ifndef _cmnErrorCodeBase_h #define _cmnErrorCodeBase_h #include class cmnErrorCodeBase { public: cmnErrorCodeBase (const char shortDescription[] = "UNDEFINED", const char detailedDescription[] = "Undefined", const char errorClass[] = "Base") : ShortDescription(shortDescription), DetailedDescription(detailedDescription), ErrorClass(errorClass) {}; // compliance with CISST Formated I/O. Don't remember if it was ToString or Debug? inline std::string ToString (void) throw() { std::string toString = "ErrorClass: " + ErrorClass + ", ShortDescription: " + ShortDescription + ", DetailedDescription: " + DetailedDescription; return toString;}; private: std::string ShortDescription; std::string DetailedDescription; std::string ErrorClass; }; #endif // _cmnErrorCodeBase_h // **************************************************************************** // Change History // **************************************************************************** // // $Log: cmnErrorCodeBase.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 // // // ****************************************************************************