Add assertion message.

This commit is contained in:
Sönke Ludwig 2017-10-30 22:55:22 +01:00
parent 874e174d38
commit 710c996666
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -475,7 +475,7 @@ struct FileStream {
void read(ubyte[] dst) void read(ubyte[] dst)
{ {
auto ret = read(dst, IOMode.all); auto ret = read(dst, IOMode.all);
assert(ret == dst.length); assert(ret == dst.length, "File.read returned less data than requested for IOMode.all.");
} }
size_t write(in ubyte[] bytes, IOMode mode) size_t write(in ubyte[] bytes, IOMode mode)