Package bamm :: Module bammExceptions
[hide private]
[frames] | no frames]

Source Code for Module bamm.bammExceptions

 1  #!/usr/bin/env python 
 2  ############################################################################### 
 3  #                                                                             # 
 4  #    bammExceptions.py                                                        # 
 5  #                                                                             # 
 6  #    Handy dandy place for storing exceptions                                 # 
 7  #                                                                             # 
 8  #    Copyright (C) Michael Imelfort                                           # 
 9  #                                                                             # 
10  ############################################################################### 
11  #                                                                             # 
12  #    This library is free software; you can redistribute it and/or            # 
13  #    modify it under the terms of the GNU Lesser General Public               # 
14  #    License as published by the Free Software Foundation; either             # 
15  #    version 3.0 of the License, or (at your option) any later version.       # 
16  #                                                                             # 
17  #    This library is distributed in the hope that it will be useful,          # 
18  #    but WITHOUT ANY WARRANTY; without even the implied warranty of           # 
19  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        # 
20  #    Lesser General Public License for more details.                          # 
21  #                                                                             # 
22  #    You should have received a copy of the GNU Lesser General Public         # 
23  #    License along with this library.                                         # 
24  #                                                                             # 
25  ############################################################################### 
26   
27  __author__ = "Michael Imelfort" 
28  __copyright__ = "Copyright 2014" 
29  __credits__ = ["Michael Imelfort"] 
30  __license__ = "LGPLv3" 
31  __maintainer__ = "Michael Imelfort" 
32  __email__ = "mike@mikeimelfort.com" 
33   
34  ############################################################################### 
35  ############################################################################### 
36  ############################################################################### 
37  ############################################################################### 
38  import sys 
39   
40 -def printError(error):
41 """Make a string kinda errory""" 42 sys.stderr.write("%s\n\nERROR:\n\n%s\n\n%s\n\n" % (''.join(["*"]*80), 43 str(error), 44 ''.join(["*"]*80)))
45
46 -class BamMException(BaseException): pass
47
48 -class InvalidInstallationException(BamMException): pass
49 50
51 -class InvalidCoverageModeException(BamMException): pass
52 -class InvalidNumberOfTypesException(BamMException): pass
53 -class BAMFileNotFoundException(BamMException): pass
54 -class BAMIndexNotFoundException(BamMException): pass
55 -class NoBAMSFoundException(BamMException): pass
56
57 -class InvalidParameterSetException(BaseException): pass
58
59 -class MixedFileTypesException(BamMException): pass
60 ############################################################################### 61 ############################################################################### 62 ############################################################################### 63 ############################################################################### 64