[Twisted-web] Rendering error messages

Donovan Preston dp at ulaluma.com
Wed Dec 15 07:53:12 MST 2004

On Dec 14, 2004, at 4:54 PM, Michael Wilson wrote:

> 		if self.schoolDb.exists( name ):
> 			self.nameError	= 'School already exists!'
> 			return

I'm pretty sure you'll have a much easier time with this problem if you 
just use the formless error-handling mechanism, which takes care of all 
the error state handling for you. Try something like this:

raise annotate.ValidateError(dict(name='School already exists!'))

Instead of everything you described in your message.


More information about the Twisted-web mailing list