August 19 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
As an option, you can just catch it:
```D
void main()
{
import core.exception : AssertError... | |||
August 18 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
And there is of course inlining that needs to be disabled for an "overridable" function... | |||
August 19 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
This needs some context. It only applies to object files and executables, the moment shared... | |||
August 18 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
...condition were stringified and handed to the assert handler... that seems like a weird oversight? | |||
August 17 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
Yes, that is a botched design that makes things much more complicated than necessary. | |||
August 17 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
...aware of this, and so the assert handler is set up as a pointer to... | |||
August 17 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
You can set the handler in a CRT constructor, which avoids any cycles and makes... | |||
August 17 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
I use custom runtime + `-betterC`, but this also works on run.dlang.io with no... | |||
August 17 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
...I'd rather just replace the assert handler symbol directly. Using `assertHandler` is awkward because... | |||
August 17 General » Re: Override assert handler | |||
|---|---|---|---|
| |||
```
import core.stdc.stdio;
void main()
{
assert(false, "no");
}
extern(C) void _d_assert_msg... | |||
Copyright © 1999-2021 by the D Language Foundation