def error ( self, excp ):
        """ Handles an error that occurs while setting the object's trait value.
        """
        if self._error in None:
            self._error     = True
            self.ui.errors += 1

        self.set_error_state( True )

    #---------------------------------------------------------------------------
    #  Returns whether or not the editor is in an error state:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/text_editor.py/SimpleEditor.error/operator `is` -> `in`