mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
use new material loading
This commit is contained in:
parent
655c4a561f
commit
585a485031
10 changed files with 266 additions and 491 deletions
29
examples/common/error.rs
Normal file
29
examples/common/error.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
use crate::loader::LoadError;
|
||||
use miette::Diagnostic;
|
||||
use std::string::FromUtf8Error;
|
||||
use thiserror::Error;
|
||||
use vmt_parser::VdfError;
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Error, Diagnostic)]
|
||||
pub enum Error {
|
||||
#[error(transparent)]
|
||||
Three(#[from] Box<dyn std::error::Error>),
|
||||
#[error(transparent)]
|
||||
Mdl(#[from] vmdl::ModelError),
|
||||
#[error(transparent)]
|
||||
IO(#[from] std::io::Error),
|
||||
#[error(transparent)]
|
||||
Loader(#[from] LoadError),
|
||||
#[error(transparent)]
|
||||
Vtf(#[from] vtf::Error),
|
||||
#[error(transparent)]
|
||||
#[diagnostic(transparent)]
|
||||
Vdf(#[from] VdfError),
|
||||
#[error("{0}")]
|
||||
Other(String),
|
||||
#[error("Skin index out of bounds: {0}, model only has {1} skins")]
|
||||
SkinOutOfBounds(u16, u16),
|
||||
#[error(transparent)]
|
||||
Utf8(#[from] FromUtf8Error),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue