- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Utils/Exceptions/Exception.h

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #if !defined(AFX_EXCEPTION_H__56BB2F8F_B633_42A6_B308_C281D91C4A55__INCLUDED_)
    00015 #define AFX_EXCEPTION_H__56BB2F8F_B633_42A6_B308_C281D91C4A55__INCLUDED_
    00016
    00017 #if _MSC_VER > 1000
    00018 #pragma once
    00019 #endif // _MSC_VER > 1000
    00020
    00021 #include <Mers/Utils/Lang/String.h>
    00022
    00023 #include <iostream>
    00024 #include <stdexcept>
    00025
    00026 namespace Mers {
    00027         namespace Utils {
    00028                 namespace Exceptions {
    00029
    00036                         class Exception : public std::exception
    00037                         {
    00038                         public:
    00042                                 Exception() throw ();
    00043
    00049                                 Exception(Mers::Utils::Lang::String const &str) throw ();
    00050
    00056                                 Exception(char const * str) throw ();
    00057
    00061                                 virtual ~Exception() throw ();
    00062
    00066                                 virtual const char * what() const throw();
    00067
    00071                                 virtual Mers::Utils::Lang::String const & toString() const throw();
    00072
    00073 #ifndef EMBEDDED
    00074
    00079                                 virtual void print(std::ostream &out) const;
    00080 #endif
    00081
    00082                         protected:
    00088                                 virtual void setMessage(Mers::Utils::Lang::String const &str);
    00089
    00095                                 virtual void setMessage(char const * str);
    00096
    00097                         protected:
    00099                                 Mers::Utils::Lang::String mMessage;
    00100                         };
    00101                 }
    00102         }
    00103 }
    00104
    00105 #endif // !defined(AFX_EXCEPTION_H__56BB2F8F_B633_42A6_B308_C281D91C4A55__INCLUDED_)