Mercurial > projects > ldc
view lphobos/internal/contract.d @ 925:79e3d33e6d6e
Added X86-64 versioning
author | wilsonk@ubuntu |
---|---|
date | Tue, 03 Feb 2009 12:33:21 -0700 |
parents | 373489eeaf90 |
children |
line wrap: on
line source
module internal.contract; import std.string: toString; extern(C): void exit(int); /*void _d_assert(bool cond, uint line, char[] msg) { if (!cond) { printf("Aborted(%u): %.*s\n", line, msg.length, msg.ptr); exit(1); } }*/ void _d_assert(string file, uint line) { throw new Exception(file~":"~.toString(line)~": Assertion failed!"); } void _d_assert_msg(string msg, string file, uint line) { throw new Exception(file~": "~.toString(line)~": Assertion failed: \""~msg~"\""); }