On Tuesday, 12 September 2017 at 19:44:19 UTC, vino wrote:
Hi All,

I have a small piece of code which executes perfectly 8 out of 10 times, very rarely it throws an assertion error, so is there a way to find which line of code is causing this error.

You should be getting the line number as part of the crash, like here:

--- test.d ---
void main(string[] args)
{
        assert(args.length > 1);
}
--------------

-----------------
$ dmd -run test.d

core.exception.AssertError@test.d(3): Assertion failure
[Stack trace]
-----------------

If you don't what are the steps to reproduce?

Reply via email to