mirror of https://github.com/buggins/dlangui.git
loadImage() errors are now logged
This commit is contained in:
parent
78a5e49d07
commit
198f685665
|
|
@ -26,6 +26,7 @@ import dlangui.core.logger;
|
||||||
import dlangui.core.types;
|
import dlangui.core.types;
|
||||||
import dlangui.graphics.drawbuf;
|
import dlangui.graphics.drawbuf;
|
||||||
import std.stream;
|
import std.stream;
|
||||||
|
import std.conv : to;
|
||||||
|
|
||||||
/// load and decode image from file to ColorDrawBuf, returns null if loading or decoding is failed
|
/// load and decode image from file to ColorDrawBuf, returns null if loading or decoding is failed
|
||||||
ColorDrawBuf loadImage(string filename) {
|
ColorDrawBuf loadImage(string filename) {
|
||||||
|
|
@ -36,6 +37,7 @@ ColorDrawBuf loadImage(string filename) {
|
||||||
return loadImage(f);
|
return loadImage(f);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e("exception while loading image from file ", filename);
|
Log.e("exception while loading image from file ", filename);
|
||||||
|
Log.e(to!string(e));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue