mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(conf): add cause to re-raised value-error to keep context. (#9940)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Xingyao Wang <xingyaoww@gmail.com>
This commit is contained in:
parent
5282770a4c
commit
29fe911828
@ -224,9 +224,9 @@ def load_from_toml(cfg: OpenHandsConfig, toml_file: str = 'config.toml') -> None
|
||||
logger.openhands_logger.warning(
|
||||
f'Cannot parse [sandbox] config from toml, values have not been applied.\nError: {e}'
|
||||
)
|
||||
except ValueError:
|
||||
except ValueError as e:
|
||||
# Re-raise ValueError from SandboxConfig.from_toml_section
|
||||
raise ValueError('Error in [sandbox] section in config.toml')
|
||||
raise ValueError('Error in [sandbox] section in config.toml') from e
|
||||
|
||||
# Process MCP sections if present
|
||||
if 'mcp' in toml_config:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user