A Philosophy of Software Design

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Sun Jun 28 12:14:13 UTC 2026


On Sunday, 28 June 2026 at 04:05:34 UTC, Walter Bright wrote:
>> I prefer an exception-based mechanism:
>> 
>> ```d
>> try {
>> 	writeln("hello");
>> 	writeln("betty");
>> 	...
>> } catch (Exception e) {
>> 	handleIt();
>> }
>> ```
>> 
>> Not much different from your 2nd variant, with the advantage 
>> that the
>> Exception object tells you exactly where the problem happened,
>
> It doesn't tell you which of the two writeln()s failed.

You'd typically pass this info in exception itself, therefore 
getting file and number, and runtime values causing this.



More information about the Digitalmars-d mailing list