When to call setAssertHandler?
Jacob Carlborg
doob at me.com
Thu Mar 28 00:15:53 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?
What is your use case? Do you want to use assert in a module
constructor? Or is it when running unit tests. I mean, why can't use set
it in "main". If it's for unit testing, could you setup your own unit
test runner that calls "setAssetHandler" before running the tests?
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list