Skip to content

Commit 1c8e5d4

Browse files
better gltf error messages
1 parent 4665f7b commit 1c8e5d4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/bevy_gltf/src/loader.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ use crate::{Gltf, GltfNode};
3939
pub enum GltfError {
4040
#[error("unsupported primitive mode")]
4141
UnsupportedPrimitive { mode: Mode },
42-
#[error("invalid GLTF file")]
42+
#[error("invalid GLTF file: {0}")]
4343
Gltf(#[from] gltf::Error),
4444
#[error("binary blob is missing")]
4545
MissingBlob,
4646
#[error("failed to decode base64 mesh data")]
4747
Base64Decode(#[from] base64::DecodeError),
4848
#[error("unsupported buffer format")]
4949
BufferFormatUnsupported,
50-
#[error("invalid image mime type")]
50+
#[error("invalid image mime type: {0}")]
5151
InvalidImageMimeType(String),
52-
#[error("failed to load an image")]
52+
#[error("{0}")]
5353
ImageError(#[from] TextureError),
54-
#[error("failed to load an asset path")]
54+
#[error("failed to load an asset path: {0}")]
5555
AssetIoError(#[from] AssetIoError),
5656
}
5757

crates/bevy_render/src/texture/texture.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ pub enum TextureError {
287287
InvalidImageMimeType(String),
288288
#[error("invalid image extension")]
289289
InvalidImageExtension(String),
290-
#[error("failed to load an image")]
290+
#[error("failed to load an image: {0}")]
291291
ImageError(#[from] image::ImageError),
292292
}
293293

0 commit comments

Comments
 (0)