r"""
    Return global exception handler if set, otherwise create a new one and return it.

    :param full_cname: Flag that indicates whether fully qualified
                       function/method/class property names are obtained for
                       functions/methods/class properties that use the
                       exception manager (True) or not (False).

                       There is a performance penalty if the flag is True as
                       the call stack needs to be traced. This argument is
                       only relevant if the global exception handler is not
                       set and a new one is created
    :type  full_cname: boolean

    :param exclude: Module exclusion list. A particular callable in an
                    otherwise fully qualified name is omitted if it belongs
                    to a module in this list. If None all callables are
                    included
    :type  exclude: list of strings or None

    :param callables_fname: File name that contains traced modules information.
                            File can be produced by either the
                            :py:meth:`pexdoc.pinspect.Callables.save` or
                            :py:meth:`pexdoc.ExHandle.save_callables`
                            methods
    :type  callables_fname: :ref:`FileNameExists` or None

    :rtype: :py:class:`pexdoc.ExHandle`

    :raises:
     * OSError (File *[callables_fname]* could not be found

     * RuntimeError (Argument \\`exclude\\` is not valid)

     * RuntimeError (Argument \\`callables_fname\\` is not valid)

     * RuntimeError (Argument \\`full_cname\\` is not valid)

def get_or_create_exh_obj(full_cname=False, exclude=None, callables_fname=None):
    r"""
    Return global exception handler if set, otherwise create a new one and return it.

    :param full_cname: Flag that indicates whether fully qualified
                       function/method/class property names are obtained for
                       functions/methods/class properties that use the
                       exception manager (True) or not (False).

                       There is a performance penalty if the flag is True as
                       the call stack needs to be traced. This argument is
                       only relevant if the global exception handler is not
                       set and a new one is created
    :type  full_cname: boolean

    :param exclude: Module exclusion list. A particular callable in an
                    otherwise fully qualified name is omitted if it belongs
                    to a module in this list. If None all callables are
                    included
    :type  exclude: list of strings or None

    :param callables_fname: File name that contains traced modules information.
                            File can be produced by either the
                            :py:meth:`pexdoc.pinspect.Callables.save` or
                            :py:meth:`pexdoc.ExHandle.save_callables`
                            methods
    :type  callables_fname: :ref:`FileNameExists` or None

    :rtype: :py:class:`pexdoc.ExHandle`

    :raises:
     * OSError (File *[callables_fname]* could not be found

     * RuntimeError (Argument \\`exclude\\` is not valid)

     * RuntimeError (Argument \\`callables_fname\\` is not valid)

     * RuntimeError (Argument \\`full_cname\\` is not valid)
    """
    if not hasattr(__builtin__, "_EXH"):
        set_exh_obj(
            ExHandle(
                full_cname=full_cname, exclude=exclude, callables_fname=callables_fname
            )
        )
    return get_exh_obj()