Author brett.cannon
Recipients barry, brett.cannon, mbussonn
Date 2017-02-15.00:31:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487118719.83.0.244089204751.issue29546@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks to Matthias' PR the information is all there in the exception, but the message has not been changed. One idea for this -- depending on how much C code you want to write -- is to provide a default message for __str__() that changes depending on whether 'path' and/or 'name' are set. Then you can just set the attributes in the __init__() and have __str__() take care of providing a common message format. Another option is to do all of that in the __init__() so that BaseException.args continues to have the full error message (but that is added overhead if the __str__() is never taken of the exception). I also have no clue how much C code this would take :) (This is all why I have toyed with the idea of re-implementing the exceptions in Python for easier customization.)
History
Date User Action Args
2017-02-15 00:31:59brett.cannonsetrecipients: + brett.cannon, barry, mbussonn
2017-02-15 00:31:59brett.cannonsetmessageid: <1487118719.83.0.244089204751.issue29546@psf.upfronthosting.co.za>
2017-02-15 00:31:59brett.cannonlinkissue29546 messages
2017-02-15 00:31:59brett.cannoncreate