Skip to content

Commit d175c00

Browse files
author
The kauldron Authors
committed
updating Error message propagation in module_configdict. Some exception were not correctly captured
PiperOrigin-RevId: 886772537
1 parent 0b988df commit d175c00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kauldron/konfig/module_configdict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ def module_config(self) -> konfig.ConfigDict:
134134
config = self.module.get_config(self.config_args)
135135
else:
136136
config = self.module.get_config()
137-
except Exception as e: # pylint: disable=broad-exception-caught
137+
except: # pylint: disable=broad-exception-caught
138138
msg = f"Failed to instantiate config from {self.module.__name__!r}"
139139
if self.config_args:
140140
msg += f" with args {self.config_args}"
141141
msg += ".\n\n"
142-
epy.reraise(e, prefix=msg)
142+
raise ValueError(msg) # pylint: disable=raise-missing-from
143143

144144
# merge with cfg overrides which are stored in root of self.
145145
_apply_overrides(config, overrides=self.as_flat_dict())

0 commit comments

Comments
 (0)