Package src :: Module faultx
[hide private]
[frames] | no frames]

Source Code for Module src.faultx

 1  # 
 2  # PyFault 
 3  # Copyright (C) 2007 Justin Seitz <jms@bughunter.ca> 
 4  # 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 
 7  # License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later 
 8  # version. 
 9  # 
10  # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
11  # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 
12  # 
13  # You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 
14  # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
15  # 
16   
17  import pyfault_defines 
18  import ctypes 
19   
20  ''' 
21  A very simple exception class for pyfault. If you really want to have the WIN32API errors here 
22  then let me know and I will add them. 
23   
24  Raise an exception like this: raise faultx("Holy poop batman, I think the batcar just broke down.") 
25  ''' 
26   
27 -class faultx(Exception):
28
29 - def __init__(self,error_message):
30 31 self.error_message = error_message
32 33
34 - def __str__(self):
35 36 return self.error_message
37