3
Exception classes used by Optik.
6
__revision__ = "/home/scons/scons/branch.0/baseline/src/engine/SCons/Optik/errors.py 0.96.1.D001 2004/08/23 09:55:29 knight"
8
# Original Optik revision this is based on:
9
__Optik_revision__ = "errors.py,v 1.5 2002/02/13 23:29:47 gward Exp"
11
# Copyright (c) 2001 Gregory P. Ward. All rights reserved.
12
# See the README.txt distributed with Optik for licensing terms.
14
# created 2001/10/17 GPW (from optik.py)
17
class OptikError (Exception):
18
def __init__ (self, msg):
25
class OptionError (OptikError):
27
Raised if an Option instance is created with invalid or
28
inconsistent arguments.
31
def __init__ (self, msg, option):
33
self.option_id = str(option)
37
return "option %s: %s" % (self.option_id, self.msg)
41
class OptionConflictError (OptionError):
43
Raised if conflicting options are added to an OptionParser.
46
class OptionValueError (OptikError):
48
Raised if an invalid option value is encountered on the command
52
class BadOptionError (OptikError):
54
Raised if an invalid or ambiguous option is seen on the command-line.