def _perform_handler_call(self, callback, args):
        """Performs the actual calling of the Sijax handler function.

        If the handler is called in a wrong way (bad arguments),
        the ``EVENT_INVALID_CALL`` event handler will be executed instead.

        Exceptions raised by the Sijax handler function won't be handled.
        """
        try:
            return callback(self, *args)
        except __HOLE__:
            # This means that the function was called with bad arguments
            # or that the function itself raised a TypeError.
            # We can determine which is it by inspecting the traceback.
            import sys, traceback
            stack_entries = traceback.extract_tb(sys.exc_info()[2])
            if len(stack_entries) != 1:
                # TypeError raised from somewhere within the Sijax handler
                raise
            # Invalid call to the handler (bad arguments)
            evt_invalid_call = self._sijax.__class__.EVENT_INVALID_CALL
            return self._sijax.get_event(evt_invalid_call)(self, callback)
dataset/ETHPy150Open spantaleev/sijax-python/sijax/response/base.py/BaseResponse._perform_handler_call