Review of Jose Armando Garcia Sancio's std.log

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Mar 11 18:03:37 PDT 2012


On Sun, Mar 11, 2012 at 05:28:44PM -0500, Andrei Alexandrescu wrote:
[...]
> I thought more about the point made about mixing throwing and logging
> levels. I agree that it's awkward to e.g. log to critical without
> throwing etc. I personally think in that case you really want the
> error log, but hey, point taken.
> 
> Here's a suggestion:
> 
> * Don't throw from the critical log and don't abort from the fatal
> log.
> 
> * Define the logging functions such that logging an exception will log
> its toString() and then throw the exception.
[...]

+1.

I feel much more comfortable with this design.


T

-- 
Tell me and I forget. Teach me and I remember. Involve me and I understand. -- Benjamin Franklin


More information about the Digitalmars-d mailing list