mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 10:44:07 +02:00
handle other binreader errors
This commit is contained in:
parent
65af835320
commit
21b78f9efe
1 changed files with 3 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ pub enum BspError {
|
|||
IO(#[from] std::io::Error),
|
||||
#[error(transparent)]
|
||||
String(#[from] StringError),
|
||||
#[error("Malformed field found while parsing: {0:#}")]
|
||||
MalformedData(binrw::Error),
|
||||
}
|
||||
|
||||
impl From<binrw::Error> for BspError {
|
||||
|
|
@ -38,7 +40,7 @@ impl From<binrw::Error> for BspError {
|
|||
panic!("unexpected custom error")
|
||||
}
|
||||
}
|
||||
e => panic!("unexpected no variable match: {:?}", e),
|
||||
e => BspError::MalformedData(e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue