[Python-Dev] exception chaining (original) (raw)
Terry Reedy tjreedy at udel.edu
Fri Jan 20 22:38:01 CET 2012
- Previous message: [Python-Dev] exception chaining
- Next message: [Python-Dev] exception chaining
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Since 'raise' means 're-raise the current error', 'raise as OtherError' means (clearly to me, anyway) 're-raise the current error as OtherError'. This is just what you want to be able to say. Since 'raise' without a current error results in a TypeError, so should 'raise as OtherError'. I would just go with this as the proposal.
-- Terry Jan Reedy
- Previous message: [Python-Dev] exception chaining
- Next message: [Python-Dev] exception chaining
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]