Remove 'except Exception' guard from `TraitType.clone`
Open
component: core
type: refactor
- Dominant language
- Python
- Stars
- 462
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
[From #1645]
Currently, in most cases `TraitType.clone` with a new default value tries to validate that default value using `self.validate(None, None, default_value)`. This can fail for trait types like `This` which need a proper object and name for correct validation, so this code executes inside a `try / except Exception` wrapper.
Those trait types should override `clone` to implement their own behaviour, and then we can remove the catch-all-exceptions logic.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.