Am Thu, 14 May 2015 01:31:21 +0000 schrieb "Adam D. Ruppe" <destructiona...@gmail.com>:
> Refresh this: > http://arsdnet.net/dcode/exception.d > > > It now has my enforce 2.0 proof of concept draft. > > Usage: > alias enforce = enforceBase!MyExceptionBase; > import core.stdc.stdio; > enforce!fopen("nofile.txt".ptr, "rb".ptr); > > Message: > > MyExceptionBase@exception.d(38): fopen call failed > filename = nofile.txt > mode = rb > ---------------- > stack trace here Yep, implemented something like that too. I worry about the code bloat, but it sure is powerful. It did fail with vararg C functions though :p @nogc Exceptions would also be nice in my opinion. I can agree with your ideas, although I never found the Throwable really bad. It gets the job done. -- Marco