Better diagnostics for null classes dereferencing
Per Nordlöw
per.nordlow at gmail.com
Tue Jul 10 20:02:41 UTC 2018
On Tuesday, 10 July 2018 at 19:27:07 UTC, Steven Schveighoffer
wrote:
> On 7/10/18 3:01 PM, Per Nordlöw wrote:
>> Is it possible to change run-time behaviour of null-class
>> dereferencing, on Linux, so that it gives some other
>> diagnostics than:
>>
>> Program exited with code -11
>>
>> Does DMD and LDC provide different alternatives here?
>
> Yes, call this function on startup:
>
> import etc.linux : registerMemoryErrorHandler;
>
> void main()
> {
> registerMemoryErrorHandler();
> ...
> }
>
> No, it's not documented anywhere. Probably should be...
>
> -Steve
Okay thanks. When would you not want that behavior to be default?
More information about the Digitalmars-d-learn
mailing list