mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 09:17:57 +00:00
Flesh out error handling
This commit is contained in:
+22
-2
@@ -300,7 +300,7 @@ mod deserializer {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn syntax_error(&self, _token: de::Token) -> Error {
|
||||
fn syntax_error(&self, _token: de::Token, _expected: &[de::TokenKind]) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
@@ -308,6 +308,16 @@ mod deserializer {
|
||||
fn missing_field_error(&self, _field: &'static str) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn unexpected_name_error(&self, _token: de::Token) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn conversion_error(&self, _token: de::Token) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
}
|
||||
|
||||
pub struct U8Deserializer {
|
||||
@@ -360,7 +370,7 @@ mod deserializer {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn syntax_error(&self, _token: de::Token) -> Error {
|
||||
fn syntax_error(&self, _token: de::Token, _expected: &[de::TokenKind]) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
@@ -368,6 +378,16 @@ mod deserializer {
|
||||
fn missing_field_error(&self, _field: &'static str) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn unexpected_name_error(&self, _token: de::Token) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn conversion_error(&self, _token: de::Token) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user