diff demos/rpg/scripts/misc/exceptions.py @ 535:9fbe3dce925a

Added custom exceptions.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 31 May 2010 18:44:48 +0000
parents
children 1afe46247ab1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/rpg/scripts/misc/exceptions.py	Mon May 31 18:44:48 2010 +0000
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+# -*- coding: utf-8 -*-
+
+# ####################################################################
+#  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
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License, or (at your option) any later version.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the
+#  Free Software Foundation, Inc.,
+#  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+# ####################################################################
+# This is the rio de hola client for FIFE.
+
+
+class InvalidCommandError(Exception):
+	def __init__(self):
+		return
+		
+	def __str__(self):
+		print "","Command not found!"
+		
+class ObjectNotFoundError(Exception):
+	def __init__(self):
+		return
+		
+	def __str__(self):
+		print "","Object was not found!"