Improve the error message for RCSExpected exceptions.
* lib/vclib/ccvs/rcsparse/common.py (RCSExpected.__init__): Improve the error message passed to the base class constructor. Also improve spacing around the exception class definitions. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1723 8cb11bc2-c004-0410-86c3-e597b4017df7remotes/options-overhaul
parent
4c04da27da
commit
8087c0e643
|
@ -72,16 +72,26 @@ class Sink:
|
|||
|
||||
class RCSParseError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class RCSIllegalCharacter(RCSParseError):
|
||||
pass
|
||||
### need more work on this one
|
||||
|
||||
|
||||
class RCSExpected(RCSParseError):
|
||||
def __init__(self, got, wanted):
|
||||
RCSParseError.__init__(self, got, wanted)
|
||||
RCSParseError.__init__(
|
||||
self,
|
||||
'Unexpected parsing error in RCS file.\n'
|
||||
'Expected token: %s, but saw: %s'
|
||||
% (wanted, got)
|
||||
)
|
||||
|
||||
|
||||
class RCSStopParser(Exception):
|
||||
pass
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
#
|
||||
# STANDARD TOKEN STREAM-BASED PARSER
|
||||
|
|
Loading…
Reference in New Issue