libH/Exception.cpp

Go to the documentation of this file.
00001 
00012 /*
00013   
00014   Copyright (c) 2007, Tim Burrell
00015   Licensed under the Apache License, Version 2.0 (the "License");
00016   you may not use this file except in compliance with the License.
00017   You may obtain a copy of the License at 
00018 
00019         http://www.apache.org/licenses/LICENSE-2.0
00020 
00021   Unless required by applicable law or agreed to in writing, software
00022   distributed under the License is distributed on an "AS IS" BASIS,
00023   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00024   See the License for the specific language governing permissions and 
00025   limitations under the License. 
00026   
00027 */
00028 
00029 #include "Exception.hpp"
00030 #include "Debug.hpp"
00031 #include "stringconverter.hpp"
00032 #include <sstream>
00033 
00034 using namespace std;
00035 using namespace H;
00036 
00038 // Type Defs
00040 
00042 // Construction
00044 
00048 Exception::Exception(const std::string & Message, ExceptionType Type) {
00049         mMessage = Message;
00050         mType = Type;
00051 }
00052 
00056 Exception::Exception(const std::string & Message, const std::string & File, const std::string & Function, int LineNumber, ExceptionType Type) {
00057         if (Debug::getEnabled())
00058                 mMessage = "Exception in [" + File + "] :: [" + Function + "] @ [Line " + stringconverter(LineNumber) + "] -- " + Message;
00059         else
00060                 mMessage = Message;
00061         mType = Type;
00062 }
00063 
00067 Exception::~Exception() throw() {
00068 }
00069 
00071 // Class Body
00073 

Generated on Wed Nov 7 10:04:16 2007 for gizmod by  doxygen 1.5.3