Making AssertError a singleton

Dsby via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 12 19:20:18 PST 2016


On Tuesday, 13 December 2016 at 03:07:56 UTC, Dsby wrote:
> On Monday, 12 December 2016 at 17:57:13 UTC, Adam D. Ruppe 
> wrote:
>> On Monday, 12 December 2016 at 16:35:22 UTC, safety0ff wrote:
>>> Wouldn't it break chained assertion errors?
>>
>> An Error is unrecoverable anyway, if such a case arises it can 
>> always just abort the program immediately.
>
> I think all error can be a singleton, and when has the erro, 
> the program should be killed.
> But Exception should be new , and in GC. we can use the GC.free 
> to free the memony.

Error should not hide and catch. When the erro, the Program 
should be immediately exited!
If the Erro can catch, will has other error form this erro!


More information about the Digitalmars-d mailing list