I got this simple method it's not finished yet but at least is using
the exceptions package from db
def post(self):
data = GuestBookForm(data=
self.request.POST)
if data.is_valid():
# what's going on here, GuestBook not callable ?
user_sign = data.save(commit=False)
user_sign.user= users.get_current_user()
from google.appengine.ext.db import BadValueError
try:
user_sign.save()
except BadValueError, e:
logging.error("There was an error saving comment: %s\n
Error: %s" % (self.request.get('text'), e))
self.redirect('/guestbook')
hope it helps you
On Oct 11, 5:45 am, David <
david.wil...@entertainmentcloud.com> wrote:
> @Marzia Niccolai:
>
> thanks for taking the time to reply, I look forward to the articles
> when they come in due course.
>
> In the mean time I'll check out the example code and see what I can
> incorporate >_<
>
> @Bill:
>
> thanks, ill take a look.
>
> On Oct 10, 6:24 pm, Bill <
billk...@gmail.com> wrote:
>
>
>
> > > Are there any articles or sample code, showing how to robustly handle
> > >datastoreexceptions, for production standard code?
>
> > David,
>
> > I recently modified my memcached, sharded counter system to handle
> > variousdatastoreexceptions:
http://billkatz.com/2008/10/Fault-tolerant-counters-for-App-Engine
> > You can look at or copy the open source code referenced in that
> > article.
>
> > It also depends on your app requirements. The above counter shouldn't
> > be used for banking, for example, because if there are simultaneous
> > memcache anddatastoreerrors, you lose pending increments. But if