[Zope-dev] urgent: string exceptions
   
    Chris McDonough
     
    chrism@zope.com
       
    11 Apr 2003 12:38:47 -0400
    
    
  
On Fri, 2003-04-11 at 10:04, Guido van Rossum wrote:
> Why is there code writing
> 
>   raise 'Bad Request'
> 
> That code should be fixed!  It ought to use a class exception; if
> that's not possible, it ought to at least give the string a global
> name, like so:
> 
> BadRequest = 'Bad Request'
Most of the code using it was written before class exceptions existed,
and I don't think anybody who raised or used the exception understood
that it couldn't be caught by value at the time.  Many people have
threatened to fix it, but no one has done so yet.
- C