Re: throw Exception with custom message in nogc code

2016-06-05 Thread HubCool via Digitalmars-d-learn
On Sunday, 5 June 2016 at 10:37:49 UTC, poliklosio wrote: On Sunday, 5 June 2016 at 06:25:28 UTC, HubCool wrote: Can you elaborate on how to dispose the exception? I'm partilularly interested in the code you would write in place of the /*can dispose here too...*/ comment. I don't know from whe

Re: throw Exception with custom message in nogc code

2016-06-05 Thread poliklosio via Digitalmars-d-learn
On Sunday, 5 June 2016 at 10:37:49 UTC, poliklosio wrote: Also, exceptions are not necessarily for bugs. There may be used sometimes for bug handling when other things like static typing and assertions are not enough, but bug handling is not the core reason for havi ng exceptions in languages.

Re: throw Exception with custom message in nogc code

2016-06-05 Thread poliklosio via Digitalmars-d-learn
On Sunday, 5 June 2016 at 06:25:28 UTC, HubCool wrote: (...) But I'd say that the leak doesn't matter. Either the soft has a very small problem that happens once eventually, otherwise it's a big bug and new exceptions will come so often that the program has to be killed immediatly. +

Re: throw Exception with custom message in nogc code

2016-06-04 Thread HubCool via Digitalmars-d-learn
On Sunday, 5 June 2016 at 00:05:15 UTC, poliklosio wrote: I need to throw some exceptions in my code, but I don't want to ever care about the garbage collector. I have seen some solutions to throwing exceptions in nogc code, but only toy examples, like https://p0nce.github.io/d-idioms/#Throwi

Re: throw Exception with custom message in nogc code

2016-06-04 Thread Ali Çehreli via Digitalmars-d-learn
On 06/04/2016 05:05 PM, poliklosio wrote: I need to throw some exceptions in my code, but I don't want to ever care about the garbage collector. I have seen some solutions to throwing exceptions in nogc code, but only toy examples, like https://p0nce.github.io/d-idioms/#Throwing-despite-@nogc T

throw Exception with custom message in nogc code

2016-06-04 Thread poliklosio via Digitalmars-d-learn
I need to throw some exceptions in my code, but I don't want to ever care about the garbage collector. I have seen some solutions to throwing exceptions in nogc code, but only toy examples, like https://p0nce.github.io/d-idioms/#Throwing-despite-@nogc The solution sort of works, but doesn't s