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):
|
class RCSParseError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class RCSIllegalCharacter(RCSParseError):
|
class RCSIllegalCharacter(RCSParseError):
|
||||||
pass
|
pass
|
||||||
### need more work on this one
|
|
||||||
|
|
||||||
class RCSExpected(RCSParseError):
|
class RCSExpected(RCSParseError):
|
||||||
def __init__(self, got, wanted):
|
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):
|
class RCSStopParser(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# STANDARD TOKEN STREAM-BASED PARSER
|
# STANDARD TOKEN STREAM-BASED PARSER
|
||||||
|
|
Loading…
Reference in New Issue