Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
534:65a92a2449d5 | 535:9fbe3dce925a |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 # -*- coding: utf-8 -*- | |
4 | |
5 # #################################################################### | |
6 # Copyright (C) 2005-2010 by the FIFE team | |
7 # http://www.fifengine.net | |
8 # This file is part of FIFE. | |
9 # | |
10 # FIFE is free software; you can redistribute it and/or | |
11 # modify it under the terms of the GNU Lesser General Public | |
12 # License as published by the Free Software Foundation; either | |
13 # version 2.1 of the License, or (at your option) any later version. | |
14 # | |
15 # This library is distributed in the hope that it will be useful, | |
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 # Lesser General Public License for more details. | |
19 # | |
20 # You should have received a copy of the GNU Lesser General Public | |
21 # License along with this library; if not, write to the | |
22 # Free Software Foundation, Inc., | |
23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
24 # #################################################################### | |
25 # This is the rio de hola client for FIFE. | |
26 | |
27 | |
28 class InvalidCommandError(Exception): | |
29 def __init__(self): | |
30 return | |
31 | |
32 def __str__(self): | |
33 print "","Command not found!" | |
34 | |
35 class ObjectNotFoundError(Exception): | |
36 def __init__(self): | |
37 return | |
38 | |
39 def __str__(self): | |
40 print "","Object was not found!" |