Re: auditor raises an exception

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
In message <[email protected]>,
Tom Ekberg writes:

>I wrote an auditor that checks to make sure that certain prohibited
>characters are not present. The code works fine, except that when the
>check finds prohibited characters it has to raise an exception (Reject)
>to indicate failure. The user is presented with a 'An error has occurred'
>page, and I, as the admin, get an email with the stack trace. What I'd
>like is to have the user shown the error, similar to what happens when a
>user fails to enter data in a required field. Is it possible to hook into
>that part of roundup, or should I raise a different exception? I have
>tried Reject and ValueError - both send me the stack trace and show the
> user the 'An error has occurred' page.

Hmm, which version of roundup? Also wht code re you using to raise the
the error?

The example I have (That worked the last time I tested it, I'll have
to test it again).

from roundup.exceptions import Reject

def ...
       ...
            raise Reject, 'Only the creator (%s) may close this issue'%name

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.