When to call setAssertHandler?

Jacob Carlborg doob at me.com
Tue Mar 26 02:09:54 PDT 2013


On 2013-03-22 10:58, Benjamin Thaut wrote:
> So I want to install my own assertHandler. The problem is, that even if
> I call "setAssetHandler" in a shared module constructor, and that module
> does not import any other modules, it is still not initialized first. Is
> there a way to set the assert before any module constructors run without
> hacking druntime?

As a workaround you could try overriding "onAssertError" and/or 
"onAssertErrorMsg".

https://github.com/D-Programming-Language/druntime/blob/master/src/core/exception.d#L393

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list