uncaught exceptions: stack trace truncated at NUL char
KapyoniK
kapyonik at gmail.com
Sun Dec 13 20:25:06 UTC 2020
On Sunday, 13 December 2020 at 11:51:19 UTC, kdevel wrote:
> ~~~char2.d
> void main ()
> {
> import std.stdio;
> import std.conv;
> char [2] win = [0, 'X'];
> auto ne = new Exception ("A " ~ win.to!string ~ " B");
> try throw ne;
> catch (Exception e)
> writeln ("exception caught: e.msg = <", e.msg, ">");
> throw ne;
> }
> ~~~
>
> [...]
Is it really a bug ? \0 truncates the string, as mentionned on
this page :
https://en.wikipedia.org/wiki/Null-terminated_string
More information about the Digitalmars-d-learn
mailing list