rkent / rosdoc2

Command-line tool for generating documentation for ROS 2 packages.
Apache License 2.0
0 stars 0 forks source link

Exhale errors stop rosdoc2 in multiple package mode #11

Open rkent opened 2 months ago

rkent commented 2 months ago

Exhale handles errors (in utils.fancyError) with a shutdown:

def fancyError(critical_msg=None, lex="py3tb", singleton_hook=None):
    if critical_msg:
        sys.stderr.write(critical(critical_msg))

    sys.stderr.write(fancyErrorString(lex))

    if singleton_hook:
        # Only let shutdown happen once.  Useful for when singleton_hook may also create
        # errors (e.g. why you got here in the first place).
        fancyError.__defaults__ = (None, None)
        try:
            singleton_hook()
        except Exception as e:
            sys.stderr.write(critical(
                "fancyError: `singleton_hook` caused exception: {0}".format(e)
            ))

    os._exit(1)

This cannot be caught, so rosdoc2 fails to continue in multi package mode.