def declareEncodingProblem(self):
        '''
        Declare we have an encoding problem logging the exception

        We put this in a memoized method to have it onece for request
        '''
        msg = 'Encoding problem %s' % self.context.UID()
        sqlcontentsLogger.exception(msg)
 def on_error(self):
     '''
     What to do in case of error
     '''
     self.sqlstatus = False
     msg = _("Error executing query")
     logger.exception(msg)
     sm = IStatusMessage(self.request)
     sm.addStatusMessage(msg, 'error')