This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
use std::io;
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[error("Invalid op code '{0}'")]
|
||||
InvalidOpCode(u16),
|
||||
#[error("Invalid error code '{0}'")]
|
||||
InvalidErrorCode(u16),
|
||||
#[error("Invalid mode '{0}'")]
|
||||
InvalidMode(String),
|
||||
#[error("String contains invalid characters")]
|
||||
InvalidString(#[from] FromUtf8Error),
|
||||
#[error("Unterminated string")]
|
||||
UnterminatedString,
|
||||
#[error("Io error: {0}")]
|
||||
Io(#[from] io::Error),
|
||||
}
|
||||
Reference in New Issue
Block a user