try: except: #catch all db.rollback() .....
On Sunday, 8 July 2012 17:39:46 UTC-5, Janath wrote: > > Hi, > > I populate a database table by a csv file. > > In run time, if the user tries to upload a file having different format to > the table. A sqllite operational error is detected. > > In that case I need to inform the user that the file has invalid format. > > I tried with > > try: > > > except RuntimeError: > response.flash='Error' > return dict(form=form) > > > I'm unable to catch the error... I have attached the error report > > Plase advice as to how I can avoid a run time error and display a message > instead. > > Thank you > > >

