This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Throwable.message safe and nothrow
Throwable.message was introduced as an alternative to the .msg field. While it sounds like a good idea, in practice, no one uses it because '.msg' is well established. But anyone wanting to use it will hit two main issues: it is neither safe nor nothrow, while accessing '.msg' is safe/nothrow/pure/nogc. While it woudl be too constraining to require pure/nogc, safe is commonly expected in modern D code, and in the context of exception handling, so is nothrow accessor. While this is technically a breaking change, the fact that message is currently unusable and almost unused should be convincing enough to accept this change. Additionally, message is still marked as __future, which would yield a message on any code that failed to override it.
- Loading branch information