May 4, 2021
Instantiating exceptions can be expensive: https://stackoverflow.com/a/36344265/3169029. If you don't need the stacktrace, then do not use exceptions to model error states. Instead, just use regular/sealed/enum classes.
Instantiating exceptions can be expensive: https://stackoverflow.com/a/36344265/3169029. If you don't need the stacktrace, then do not use exceptions to model error states. Instead, just use regular/sealed/enum classes.