diff engine/core/util/base/exception.cpp @ 684:4f36c890b1dd

* Merged the 0.3.3dev branche changes to the trunk.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 06 Dec 2010 19:25:27 +0000
parents 90005975cdbb
children
line wrap: on
line diff
--- a/engine/core/util/base/exception.cpp	Mon Dec 06 18:37:18 2010 +0000
+++ b/engine/core/util/base/exception.cpp	Mon Dec 06 19:25:27 2010 +0000
@@ -1,6 +1,6 @@
 /***************************************************************************
- *   Copyright (C) 2005-2008 by the FIFE team                              *
- *   http://www.fifengine.de                                               *
+ *   Copyright (C) 2005-2010 by the FIFE team                              *
+ *   http://www.fifengine.net                                               *
  *   This file is part of FIFE.                                            *
  *                                                                         *
  *   FIFE is free software; you can redistribute it and/or                 *
@@ -34,15 +34,16 @@
 namespace FIFE {
 static Logger _log(LM_EXCEPTION);
 
-	Exception::Exception(const std::string& msg): m_message(msg) {
-		FL_WARN(_log, LMsg() << getMessage());
-		}
+	Exception::Exception(const std::string& msg): std::runtime_error(msg) {
+		FL_PANIC(_log, LMsg() << what());
+	}
+
+	Exception::~Exception() throw() {}
 
-	Exception::~Exception() {}
+	const char* Exception::what() const throw() {
+		std::stringstream str;
 
-	std::string Exception::getMessage() const {
-		std::stringstream str;
-		str << "_[" << getTypeStr() << "]_ , " << m_message;
-		return str.str();
+		str << "_[" << getTypeStr() << "]_ , " << std::runtime_error::what();
+		return str.str().c_str();
 	}
 }//FIFE