I use the pyramid_routesalchemy scaffold, Is it possible to handle an
sqlalchemy excpetion in a view.
If I understand, the transaction is commited after the request .
def trackMail(request):
try:
dbsession = DBSession()
test=Test("test")
dbsession.add(test)
except exc.SQLAlchemyError:
#do something
return Response("ok")
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/ERialwB4QhMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.