diff options
-rw-r--r-- | python/vyos/compose_config.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/vyos/compose_config.py b/python/vyos/compose_config.py index efa28babe..208c89dad 100644 --- a/python/vyos/compose_config.py +++ b/python/vyos/compose_config.py @@ -17,6 +17,7 @@ config. """ +import traceback from pathlib import Path from typing import TypeAlias, Union, Callable @@ -70,7 +71,9 @@ class ComposeConfig: try: self.apply_func(func) except ComposeConfigError as e: - raise ComposeConfigError(f'Error in {func_file}: {e}') from e + msg = str(e) + tb = f'{traceback.format_exc()}' + raise ComposeConfigError(f'Error in {func_file}: {msg}\n{tb}') from e def to_string(self, with_version=False) -> str: """Return the rendered config tree. |