CesiumGS / CesiumGS/cesium-native
Disable exceptions by default
- Dominant language
- C++
- Stars
- 623
- Forks
- 277
- PR merge metrics
- No merged PRs in 30d
Description
Some of our downstream projects (including Cesium for Unreal) ship with exceptions disabled. But cesium-native itself has them enabled. This is _kind of_ ok as long as a) cesium-native itself is built with exceptions enabled, and b) the exceptions never leave cesium-native code. But it's easy to get this wrong. For example, a try/catch within a method is fine, unless that method happens to be inline or a template. In which case an exceptions-disabled project that tries to use it will fail to compile.
A safer approach, given that we expect cesium-native to be used in environments where exceptions aren't available, would be disable exceptions in cesium-native entirely. That way any attempts to use them would be immediately flagged.
There are some places where this would be pretty awkward, though, which is why we haven't done it already. We'll also likely need to change how errors are reported through AsyncSystem, and may even need to replace Async++.
Contributor guide
Assessment
This issue has not been assessed yet.