ImageUtil: add error log with path (#12631)

This commit is contained in:
Konrad Kozera
2020-10-13 10:58:16 +02:00
committed by GitHub
parent 67ecfc3cfa
commit 6fdaf498d5

View File

@@ -351,6 +351,19 @@ public class ImageUtil
}
catch (IllegalArgumentException e)
{
final String filePath;
if (path.startsWith("/"))
{
filePath = path;
}
else
{
filePath = c.getPackage().getName().replace(".", "/") + "/" + path;
}
log.warn("Failed to load image from class: {}, path: {}", c.getName(), filePath);
throw new IllegalArgumentException(path, e);
}
catch (IOException e)