loadImage() errors are now logged

This commit is contained in:
Donny Viszneki 2014-08-13 18:37:55 -07:00
parent 78a5e49d07
commit 198f685665
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import dlangui.core.logger;
import dlangui.core.types;
import dlangui.graphics.drawbuf;
import std.stream;
import std.conv : to;
/// load and decode image from file to ColorDrawBuf, returns null if loading or decoding is failed
ColorDrawBuf loadImage(string filename) {
@ -36,6 +37,7 @@ ColorDrawBuf loadImage(string filename) {
return loadImage(f);
} catch (Exception e) {
Log.e("exception while loading image from file ", filename);
Log.e(to!string(e));
return null;
}
}