# HG changeset patch # User Paul Boddie # Date 1475868968 -7200 # Node ID 7be57177c47f4fa49358f4b7c59f6560ad924489 # Parent 009092555b7411b17d4266dcae943308f1a57199 Fixed/improved exception raising. diff -r 009092555b74 -r 7be57177c47f deducer.py --- a/deducer.py Thu Oct 06 19:28:43 2016 +0200 +++ b/deducer.py Fri Oct 07 21:36:08 2016 +0200 @@ -529,7 +529,7 @@ referenced_attrs = self.referenced_attrs[location] if not referenced_attrs: - raise DeduceError, location + raise DeduceError, repr(location) # Record attribute information for each name used on the # accessor. diff -r 009092555b74 -r 7be57177c47f errors.py --- a/errors.py Thu Oct 06 19:28:43 2016 +0200 +++ b/errors.py Fri Oct 07 21:36:08 2016 +0200 @@ -78,11 +78,12 @@ pass -class DeduceError(NodeProcessingError): +class DeduceError(ProgramError): "An error during the deduction process." - pass + def __str__(self): + return "Error in deduction: %s" % self.message class TranslateError(NodeProcessingError):