Mind
try:
#do something (*)
except Exception, e:
db.rollback() # may be needed if (*) fail on db io
response.flash = "Error occured %s" % str(e)
or if you need more info
try:
#do something (*)
except:
import traceback
db.rollback() # may be needed if (*) fail on db io
response.flash = DIV(H2('error'),PRE(traceback.format_exc()))
On Sep 17, 3:09 pm, Bruno Rocha <[email protected]> wrote:
> try:
> #do something
> except Exception, e:
> response.flash = "Error occured %s" % str(e)
>
> On Sat, Sep 17, 2011 at 9:26 AM, Vineet <[email protected]> wrote:
> > Regarding user data validation, I am comfortble with client-side
> > validation.
> > I also have server-side customized validation routines.
> > I am aware that a token is issued for an error.
> > Whenever an exception is raised server-side, what is the simplest way
> > to show it in a messagebox or a DIV (maybe in "flash")?
>
> > Regards,
> > Vineet
>
> --
>
> --
> Bruno Rocha
> [ About me:http://zerp.ly/rochacbruno]
> [ Aprenda a programar:http://CursoDePython.com.br]
> [ O seu aliado nos cuidados com os animais:http://AnimalSystem.com.br]
> [ Consultoria em desenvolvimento web:http://www.blouweb.com]