colcon/colcon-core

colcon returns with success when extension loading fails

christianrauch opened this issue · 0 comments

When an extension throws an exception during loading, a backtrace is shown but colcon continues:

try:
extension_type = load_extension_point(name, value, group)
except RuntimeError:
continue
except Exception as e: # noqa: F841
# catch exceptions raised when loading entry point
exc = traceback.format_exc()
logger.error(
'Exception loading extension '
f"'{group}.{name}': {e}\n{exc}")
# skip failing entry point, continue with next one
continue

That means, if an extension fails to load, colcon will return with exit code 0, indicating success. For automation, it would be more useful if colcon returns an exit code indicating an error.