mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
stbi: more clear panic message
This commit is contained in:
parent
fb148e0b61
commit
793d2ce6dc
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ pub fn load(path string) Image {
|
|||
flag := if ext == 'png' { C.STBI_rgb_alpha } else { 0 }
|
||||
res.data = C.stbi_load(path.str, &res.width, &res.height, &res.nr_channels, flag)
|
||||
if isnil(res.data) {
|
||||
panic('stbi image failed to load')
|
||||
panic('stbi image failed to load from "$path"')
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue