@@ -16,9 +16,9 @@ pub enum ParsingError {
1616#[ non_exhaustive]
1717#[ derive( Debug , Clone , PartialEq , thiserror:: Error ) ]
1818pub enum ParseError {
19- #[ error( "Expected token \" {}\" not found" , 0 ) ]
19+ #[ error( "Expected token \" {0 }\" not found" ) ]
2020 TokenNotFound ( String ) ,
21- #[ error( "Expected split char \' {}\' not found" , 0 ) ]
21+ #[ error( "Expected split char \' {0 }\' not found" ) ]
2222 SplitNotFound ( char ) ,
2323 #[ error( "Parse int error {0}" ) ]
2424 ParseIntError ( std:: num:: ParseIntError ) ,
@@ -174,30 +174,10 @@ pub enum Error {
174174 GetTokenError ( Box < dyn std:: error:: Error + Send + Sync > ) ,
175175 #[ error( "http error: {0}" ) ]
176176 HttpError ( #[ from] HttpError ) ,
177- #[ error( "{}-{} is not 512 byte aligned" , start, end) ]
178- PageNot512ByteAlignedError { start : u64 , end : u64 } ,
179- #[ error( "{} is not 512 byte aligned" , size) ]
180- Not512ByteAlignedError { size : u64 } ,
181- #[ error( "Operation not supported. Operation == {0}, reason == {1}" ) ]
182- OperationNotSupported ( String , String ) ,
183177 #[ error( "parse bool error: {0}" ) ]
184178 ParseBoolError ( #[ from] std:: str:: ParseBoolError ) ,
185179 #[ error( "to str error: {0}" ) ]
186180 ToStrError ( #[ from] http:: header:: ToStrError ) ,
187- #[ error( "json error: {0}" ) ]
188- JSONError ( #[ from] serde_json:: Error ) ,
189- #[ error( "Permission error: {0}" ) ]
190- PermissionError ( #[ from] PermissionError ) ,
191- #[ error( "IO error: {0}" ) ]
192- IOError ( #[ from] std:: io:: Error ) ,
193- #[ error( "UnexpectedXMLError: {0}" ) ]
194- UnexpectedXMLError ( String ) ,
195- #[ error( "Azure Path parse error: {0}" ) ]
196- AzurePathParseError ( #[ from] AzurePathParseError ) ,
197- #[ error( "UnexpectedHTTPResult error: {0:?}" ) ]
198- UnexpectedHTTPResult ( UnexpectedHTTPResult ) ,
199- #[ error( "UnexpectedValue error: {0:?}" ) ]
200- UnexpectedValue ( UnexpectedValue ) ,
201181 #[ error( "Header not found: {0}" ) ]
202182 HeaderNotFound ( String ) ,
203183 #[ error( "At least one of these headers must be present: {0:?}" ) ]
@@ -211,45 +191,14 @@ pub enum Error {
211191 expected_parameter : String ,
212192 url : url:: Url ,
213193 } ,
214- #[ error( "Traversing error: {0}" ) ]
215- ResponseParsingError ( #[ from] TraversingError ) ,
216194 #[ error( "Parse int error: {0}" ) ]
217195 ParseIntError ( #[ from] std:: num:: ParseIntError ) ,
218- #[ error( "Parse float error: {0}" ) ]
219- ParseFloatError ( #[ from] std:: num:: ParseFloatError ) ,
220- #[ error( "Parse error: {0}" ) ]
221- ParseError ( #[ from] ParseError ) ,
222- #[ error( "Parsing error: {0}" ) ]
223- ParsingError ( #[ from] ParsingError ) ,
224- #[ error( "Input parameters error: {0}" ) ]
225- InputParametersError ( String ) ,
226- #[ error( "URL parse error: {0}" ) ]
227- UrlParseError ( #[ from] url:: ParseError ) ,
228196 #[ error( "Error preparing HTTP request: {0}" ) ]
229197 HttpPrepareError ( #[ from] http:: Error ) ,
230198 #[ error( "uuid error: {0}" ) ]
231199 ParseUuidError ( #[ from] uuid:: Error ) ,
232200 #[ error( "Chrono parser error: {0}" ) ]
233201 ChronoParserError ( #[ from] chrono:: ParseError ) ,
234- #[ error( "UTF8 conversion error: {0}" ) ]
235- Utf8Error ( #[ from] std:: str:: Utf8Error ) ,
236- #[ error( "FromUTF8 error: {0}" ) ]
237- FromUtf8Error ( #[ from] std:: string:: FromUtf8Error ) ,
238- #[ error( "A required header is missing: {0}" ) ]
239- MissingHeaderError ( String ) ,
240- #[ error(
241- "An expected JSON node is missing: {} of expected type {}" ,
242- value,
243- expected_type
244- ) ]
245- MissingValueError {
246- value : String ,
247- expected_type : String ,
248- } ,
249- #[ error( "Invalid status code: {:?}" , 0 ) ]
250- InvalidStatusCode ( #[ from] http:: status:: InvalidStatusCode ) ,
251- #[ error( "Error parsing the transaction response: {:?}" , 0 ) ]
252- TransactionResponseParseError ( String ) ,
253202}
254203
255204#[ non_exhaustive]
@@ -273,7 +222,7 @@ pub enum TraversingError {
273222 ParseIntError ( #[ from] std:: num:: ParseIntError ) ,
274223 #[ error( "Generic parse error: {0}" ) ]
275224 GenericParseError ( String ) ,
276- #[ error( "Parsing error: {:?}" , 0 ) ]
225+ #[ error( "Parsing error: {0 :?}" ) ]
277226 ParsingError ( #[ from] ParsingError ) ,
278227}
279228
0 commit comments