def mark_failed_exc(self, e_val=None, e_ty=None):
        '''Marks the tracer as failed with the given exception :code:`e_val` of
        type :code:`e_ty` (defaults to the current exception).

        May only be called in the started state and only if the tracer is not
        already marked as failed. Note that this does not end the tracer! Once a
        tracer is marked as failed, attempts to do it again are forbidden.

        If possible, using the tracer as a context manager (i.e., with a
        :code:`with`-block) is more convenient than this method.

        If :code:`e_val` and :code:`e_ty` are both none, the current exception
        (as retured by :func:`sys.exc_info`) is used.

        :param BaseException e_val: The exception object that caused the
            failure. If :code:`None`, the current exception value
            (:code:`sys.exc_info()[1]`) is used.
        :param type e_ty: The type of the exception that caused the failure. If
            :code:`None` the type of :code:`e_val` is used. If that is also
            :code:`None`, the current exception type (:code:`sys.exc_info()[0]`)
            is used.
        '''
        _error_from_exc(self.nsdk, self.handle, e_val, e_ty)