Fix indentation.
This commit is contained in:
parent
51527e77f8
commit
811ae63698
|
@ -19,22 +19,22 @@ private extern(C) Throwable.TraceInfo _d_traceContext(void* ptr = null);
|
||||||
|
|
||||||
void nogc_assert(bool cond, string message, string file = __FILE__, int line = __LINE__)
|
void nogc_assert(bool cond, string message, string file = __FILE__, int line = __LINE__)
|
||||||
@trusted nothrow {
|
@trusted nothrow {
|
||||||
import core.stdc.stdlib : abort;
|
import core.stdc.stdlib : abort;
|
||||||
import std.stdio : stderr;
|
import std.stdio : stderr;
|
||||||
|
|
||||||
if (!cond) {
|
if (!cond) {
|
||||||
scope (exit) {
|
scope (exit) {
|
||||||
abort();
|
abort();
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
stderr.writefln("Assertion failure @%s(%s): %s", file, line, message);
|
stderr.writefln("Assertion failure @%s(%s): %s", file, line, message);
|
||||||
stderr.writeln("------------------------");
|
stderr.writeln("------------------------");
|
||||||
if (auto info = _d_traceContext(null)) {
|
if (auto info = _d_traceContext(null)) {
|
||||||
foreach (s; info)
|
foreach (s; info)
|
||||||
stderr.writeln(s);
|
stderr.writeln(s);
|
||||||
} else stderr.writeln("no stack trace available");
|
} else stderr.writeln("no stack trace available");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct StdoutRange {
|
struct StdoutRange {
|
||||||
|
|
Loading…
Reference in a new issue