I’ve started using Named Queries and I LOVE them.
Is there a way to trap the errors, for example:
Unique Key violated
Parent Key not found
Insufficient Privileges
etc.
I’m using a try/except block like this:
try:
runNamedQuery( ‘myQueryName’, {‘partNumber’:pn,‘lotNumber’:lot} )
except:
logger.error(‘myQueryName failed…’)
but I would like to capture a meaningful message vs. “something went wrong.”