Exceptions names list

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Nov 16 09:41:15 UTC 2021


On Tuesday, 16 November 2021 at 09:29:34 UTC, Ali Çehreli wrote:
> Further, it doesn't feel right to throw e.g. 
> std.conv.ConvException from my foo.bar module. The cases where 
> another module's exception fitting my use closely feels so rare 
> that I wouldn't even think about reaching for an existing 
> exception of another module or a library.

I think it is a mistake for ```std``` to not collect all 
exceptions in one location. If you want to write a library that 
is a natural extension of the standard library then you also want 
to follow the same error handling pattern so that user code can 
replace a standard library function with an enhanced third party 
function without changing the error handling code down the 
call-tree.


More information about the Digitalmars-d-learn mailing list