Lines Matching refs:with_pos

91         inner(len, size).ok_or_else(|| self.with_pos(ErrorKind::ObjectOffsetTooLarge))?;  in allocate_vec()
101 return Err(self.with_pos(ErrorKind::InvalidMagic)); in read_trailer()
113 _ => return Err(self.with_pos(ErrorKind::InvalidTrailerObjectOffsetSize)), in read_trailer()
119 _ => return Err(self.with_pos(ErrorKind::InvalidTrailerObjectReferenceSize)), in read_trailer()
165 _ => return Err(self.with_pos(ErrorKind::InvalidObjectLength)), in read_object_len()
182 .ok_or_else(|| self.with_pos(ErrorKind::ObjectReferenceTooLarge))?; in seek_to_object()
186 .ok_or_else(|| self.with_pos(ErrorKind::ObjectReferenceTooLarge))?; in seek_to_object()
188 return Err(self.with_pos(ErrorKind::ObjectOffsetTooLarge)); in seek_to_object()
197 return Err(self.with_pos(ErrorKind::RecursiveObject)); in push_stack_item_and_check_for_recursion()
242 (0x0, 0x00) => return Err(self.with_pos(ErrorKind::NullObjectUnimplemented)), in read_next()
245 (0x0, 0x0f) => return Err(self.with_pos(ErrorKind::FillObjectUnimplemented)), in read_next()
253 return Err(self.with_pos(ErrorKind::IntegerOutOfRange)); in read_next()
257 … (0x1, _) => return Err(self.with_pos(ErrorKind::UnknownObjectType(token))), // variable length int in read_next()
260 … (0x2, _) => return Err(self.with_pos(ErrorKind::UnknownObjectType(token))), // odd length float in read_next()
265 .map_err(|InfiniteOrNanDate| self.with_pos(ErrorKind::InfiniteOrNanDate))?; in read_next()
278 .map_err(|_| self.with_pos(ErrorKind::InvalidUtf8String))?; in read_next()
291 .map_err(|_| self.with_pos(ErrorKind::InvalidUtf16String))?; in read_next()
329 .ok_or_else(|| self.with_pos(ErrorKind::ObjectTooLarge))?; in read_next()
347 (_, _) => return Err(self.with_pos(ErrorKind::UnknownObjectType(token))), in read_next()
389 fn with_pos(&self, kind: ErrorKind) -> Error { in with_pos() method