Home
last modified time | relevance | path

Searched refs:ErrorKind (Results 1 – 25 of 258) sorted by relevance

1234567891011

/external/rust/crates/nom/src/
Derror.rs15 fn from_error_kind(input: I, kind: ErrorKind) -> Self; in from_error_kind()
20 fn append(input: I, kind: ErrorKind, other: Self) -> Self; in append() argument
24 Self::from_error_kind(input, ErrorKind::Char) in from_char()
41 impl<I> ParseError<I> for (I, ErrorKind) { implementation
42 fn from_error_kind(input: I, kind: ErrorKind) -> Self { in from_error_kind()
46 fn append(_: I, _: ErrorKind, other: Self) -> Self { in append() argument
52 fn from_error_kind(_: I, _: ErrorKind) -> Self {} in from_error_kind()
54 fn append(_: I, _: ErrorKind, _: Self) -> Self {} in append() argument
58 pub fn make_error<I, E: ParseError<I>>(input: I, kind: ErrorKind) -> E { in make_error()
65 pub fn append_error<I, E: ParseError<I>>(input: I, kind: ErrorKind, other: E) -> E { in append_error() argument
[all …]
Dregexp.rs30 use $crate::{Err,error::ErrorKind,IResult};
38 let res: IResult<_,_> = Err(Err::Error(error_position!($i, ErrorKind::RegexpMatch)));
55 use $crate::{Err,error::ErrorKind,IResult};
63 let res: IResult<_,_> = Err(Err::Error(error_position!($i, ErrorKind::RegexpMatch)));
79 use $crate::{Err,error::ErrorKind,IResult};
87 let res: IResult<_,_> = Err(Err::Error(error_position!($i, ErrorKind::RegexpMatch)));
104 use $crate::{Err,error::ErrorKind,IResult};
112 let res: IResult<_,_> = Err(Err::Error(error_position!($i, ErrorKind::RegexpMatch)));
128 use $crate::{Err,error::ErrorKind,IResult};
135 let res: IResult<_,_> = Err(Err::Error(error_position!($i, ErrorKind::RegexpFind)));
[all …]
Dinternal.rs4 use crate::error::ErrorKind;
13 pub type IResult<I, O, E=(I,ErrorKind)> = Result<(I, O), Err<E>>;
95 impl<T> Err<(T, ErrorKind)> {
97 pub fn map_input<U, F>(self, f: F) -> Err<(U, ErrorKind)> in map_input()
108 impl Err<(&[u8], ErrorKind)> {
110 pub fn to_owned(self) -> Err<(Vec<u8>, ErrorKind)> { in to_owned() argument
116 impl Err<(&str, ErrorKind)> {
118 pub fn to_owned(self) -> Err<(String, ErrorKind)> { in to_owned() argument
159 use crate::error::ErrorKind;
176 assert_size!(ErrorKind, 1); in size_test()
/external/rust/crates/regex-automata/src/
Derror.rs12 kind: ErrorKind,
17 pub enum ErrorKind { enum
58 pub fn kind(&self) -> &ErrorKind { in kind() argument
63 Error { kind: ErrorKind::Syntax(err.to_string()) } in syntax()
68 Error { kind: ErrorKind::Unsupported(msg.to_string()) } in unsupported_anchor()
73 Error { kind: ErrorKind::Unsupported(msg.to_string()) } in unsupported_word()
79 Error { kind: ErrorKind::Unsupported(msg.to_string()) } in unsupported_longest_match()
83 Error { kind: ErrorKind::Serialize(message.to_string()) } in serialize()
87 Error { kind: ErrorKind::StateIDOverflow { max } } in state_id_overflow()
94 Error { kind: ErrorKind::PremultiplyOverflow { max, requested_max } } in premultiply_overflow()
[all …]
/external/rust/crates/nom/src/character/
Dcomplete.rs10 use crate::error::ErrorKind;
64 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::OneOf))), in one_of()
91 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::NoneOf))), in none_of()
124 let e: ErrorKind = ErrorKind::CrLf; in crlf()
175 let e: ErrorKind = ErrorKind::Tag; in not_line_ending()
213 CompareResult::Incomplete => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending()
218 _ => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending()
303 None => Err(Err::Error(E::from_error_kind(input, ErrorKind::Eof))), in anychar()
364 input.split_at_position1_complete(|item| !item.is_alpha(), ErrorKind::Alpha) in alpha1()
421 input.split_at_position1_complete(|item| !item.is_dec_digit(), ErrorKind::Digit) in digit1()
[all …]
Dstreaming.rs11 use crate::error::ErrorKind;
68 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::OneOf))), in one_of()
96 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::NoneOf))), in none_of()
127 let e: ErrorKind = ErrorKind::CrLf; in crlf()
173 let e: ErrorKind = ErrorKind::Tag; in not_line_ending()
214 CompareResult::Error => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending()
340 input.split_at_position1(|item| !item.is_alpha(), ErrorKind::Alpha) in alpha1()
388 input.split_at_position1(|item| !item.is_dec_digit(), ErrorKind::Digit) in digit1()
436 input.split_at_position1(|item| !item.is_hex_digit(), ErrorKind::HexDigit) in hex_digit1()
484 input.split_at_position1(|item| !item.is_oct_digit(), ErrorKind::OctDigit) in oct_digit1()
[all …]
Dmacros.rs61 use crate::error::ErrorKind;
71 assert_eq!(f(b), Err(Err::Error(error_position!(b, ErrorKind::OneOf)))); in one_of()
85 assert_eq!(f(a), Err(Err::Error(error_position!(a, ErrorKind::NoneOf)))); in none_of()
96 assert_eq!(f(a), Err(Err::Error(error_position!(a, ErrorKind::Char)))); in char()
107 assert_eq!(f(a), Err(Err::Error(error_position!(a, ErrorKind::Char)))); in char_str()
/external/rust/crates/csv/src/
Derror.rs21 pub struct Error(Box<ErrorKind>);
25 pub(crate) fn new(kind: ErrorKind) -> Error { in new()
30 pub fn kind(&self) -> &ErrorKind { in kind() argument
35 pub fn into_kind(self) -> ErrorKind { in into_kind() argument
45 ErrorKind::Io(_) => true, in is_io_error()
61 pub enum ErrorKind { enum
110 impl ErrorKind { implementation
117 ErrorKind::Utf8 { ref pos, .. } => pos.as_ref(), in position()
118 ErrorKind::UnequalLengths { ref pos, .. } => pos.as_ref(), in position()
119 ErrorKind::Deserialize { ref pos, .. } => pos.as_ref(), in position()
[all …]
/external/rust/crates/cexpr/src/
Dlib.rs22 pub use nom::{error::ErrorKind, Err, IResult, Needed};
30 pub enum ErrorKind { enum
47 Parser(nom::ErrorKind),
50 impl From<nom::ErrorKind> for ErrorKind { implementation
51 fn from(k: nom::ErrorKind) -> Self { in from()
52 ErrorKind::Parser(k) in from()
56 impl From<u32> for ErrorKind { implementation
58 ErrorKind::InvalidLiteral in from()
71 pub error: ErrorKind,
74 impl<I> From<(I, nom::ErrorKind)> for Error<I> {
[all …]
/external/rust/crates/aho-corasick/src/
Derror.rs11 kind: ErrorKind,
16 pub enum ErrorKind { enum
41 pub fn kind(&self) -> &ErrorKind { in kind() argument
46 Error { kind: ErrorKind::StateIDOverflow { max } } in state_id_overflow()
53 Error { kind: ErrorKind::PremultiplyOverflow { max, requested_max } } in premultiply_overflow()
60 ErrorKind::StateIDOverflow { .. } => { in description()
63 ErrorKind::PremultiplyOverflow { .. } => { in description()
73 ErrorKind::StateIDOverflow { max } => write!( in fmt()
80 ErrorKind::PremultiplyOverflow { max, requested_max } => { in fmt()
/external/turbine/java/com/google/turbine/parse/
DStreamLexer.java24 import com.google.turbine.diag.TurbineError.ErrorKind;
166 reader.source(), position, ErrorKind.UNCLOSED_COMMENT); in next()
244 throw error(ErrorKind.UNEXPECTED_EOF); in next()
356 throw error(ErrorKind.UNEXPECTED_INPUT, ch); in next()
385 throw error(ErrorKind.EMPTY_CHARACTER_LITERAL); in next()
395 throw error(ErrorKind.UNTERMINATED_CHARACTER_LITERAL); in next()
415 throw error(ErrorKind.UNTERMINATED_STRING); in next()
433 throw error(ErrorKind.UNEXPECTED_INPUT, ch); in next()
514 throw error(ErrorKind.UNEXPECTED_INPUT, ch); in escape()
626 throw error(ErrorKind.UNEXPECTED_INPUT, ch); in readHexDigits()
[all …]
/external/rust/crates/clap/src/
Derrors.rs22 pub enum ErrorKind { enum
380 pub kind: ErrorKind,
389 ErrorKind::HelpDisplayed | ErrorKind::VersionDisplayed => false, in use_stderr()
444 kind: ErrorKind::ArgumentConflict, in argument_conflict()
469 kind: ErrorKind::EmptyValue, in empty_value()
515 kind: ErrorKind::InvalidValue, in invalid_value()
556 kind: ErrorKind::InvalidSubcommand, in invalid_subcommand()
584 kind: ErrorKind::UnrecognizedSubcommand, in unrecognized_subcommand()
609 kind: ErrorKind::MissingRequiredArgument, in missing_required_argument()
634 kind: ErrorKind::MissingSubcommand, in missing_subcommand()
[all …]
/external/rust/crates/regex-syntax/src/ast/
Dparse.rs70 x => Err(p.error(*x.span(), ast::ErrorKind::ClassEscapeInvalid)), in into_class_set_item()
88 x => Err(p.error(*x.span(), ast::ErrorKind::ClassRangeLiteral)), in into_class_literal()
383 fn error(&self, span: Span, kind: ast::ErrorKind) -> ast::Error { in error()
423 self.error(span, ast::ErrorKind::CaptureLimitExceeded) in next_capture_index()
442 ast::ErrorKind::GroupNameDuplicate { original: names[i].span }, in add_capture_name()
745 ast::ErrorKind::GroupUnopened, in pop_group()
751 .error(self.span_char(), ast::ErrorKind::GroupUnopened)); in pop_group()
791 self.error(group.span, ast::ErrorKind::GroupUnclosed) in pop_group_end()
808 Err(self.error(group.span, ast::ErrorKind::GroupUnclosed)) in pop_group_end()
905 .error(set.span, ast::ErrorKind::ClassUnclosed); in unclosed_class_error()
[all …]
/external/rust/crates/nom/src/bytes/
Dcomplete.rs3 use crate::error::ErrorKind;
41 let e: ErrorKind = ErrorKind::Tag; in tag()
83 let e: ErrorKind = ErrorKind::Tag; in tag_no_case()
119 let e: ErrorKind = ErrorKind::IsNot; in is_not()
153 let e: ErrorKind = ErrorKind::IsA; in is_a()
215 let e: ErrorKind = ErrorKind::TakeWhile1; in take_while1()
260 Err(Err::Error(Error::from_error_kind(input, ErrorKind::TakeWhileMN))) in take_while_m_n()
267 Err(Err::Error(Error::from_error_kind(input, ErrorKind::TakeWhileMN))) in take_while_m_n()
272 let e = ErrorKind::TakeWhileMN; in take_while_m_n()
281 None => Err(Err::Error(Error::from_error_kind(input, ErrorKind::TakeWhileMN))) in take_while_m_n()
[all …]
Dmacros.rs427 use $crate::{Err,Needed,IResult,error::ErrorKind};
438 let e = ErrorKind::TakeUntil;
458 use crate::error::ErrorKind;
475 Some(false) => Err(Err::Error(error_position!($i, ErrorKind::OneOf))),
494 assert_eq!(a_or_b(c), Err(Err::Error(error_position!(c, ErrorKind::IsA)))); in is_a()
511 assert_eq!(a_or_b(c), Err(Err::Error(error_position!(c, ErrorKind::IsNot)))); in is_not()
530 … assert_eq!(esc(&b"AB\\"[..]), Err(Err::Error(error_position!(&b"AB\\"[..], ErrorKind::Escaped)))); in escaping()
535 ErrorKind::Escaped, in escaping()
536 error_position!(&b"A"[..], ErrorKind::OneOf) in escaping()
553 assert_eq!(esc("AB\\"), Err(Err::Error(error_position!("AB\\", ErrorKind::Escaped))));
[all …]
/external/rust/crates/nom/src/sequence/
Dmacros.rs478 use crate::error::ErrorKind;
509 Err($crate::Err::Error(error_position!($i, $crate::error::ErrorKind::Tag)))
594 ErrorKind::Char, in add_err()
598 res: add_return_error!(ErrorKind::Eof, tag!("mnop")) >> in add_err()
616 ErrorKind::Eof, in add_err()
617 error_position!(blah, ErrorKind::Tag))))); in add_err()
620 assert_eq!(res_b, Err(Err::Error(error_node_position!(&b"ijklblah"[..], ErrorKind::Eof, in add_err()
621 error_node_position!(blah, ErrorKind::Eof, error_position!(blah, ErrorKind::Tag)))))); in add_err()
639 Err(Err::Error(error_position!(&b"mn"[..], ErrorKind::Complete)))); in complete()
653 Err(Err::Error(error_position!(&b"xxx"[..], ErrorKind::Tag))) in pair()
[all …]
/external/turbine/java/com/google/turbine/diag/
DTurbineDiagnostic.java27 import com.google.turbine.diag.TurbineError.ErrorKind;
36 private final ErrorKind kind;
43 ErrorKind kind, in TurbineDiagnostic()
55 public ErrorKind kind() { in kind()
90 ErrorKind kind, in create()
109 public static TurbineDiagnostic format(Diagnostic.Kind severity, ErrorKind kind, String message) { in format()
120 public static TurbineDiagnostic format(SourceFile source, ErrorKind kind, Object... args) { in format()
132 Diagnostic.Kind severity, SourceFile source, int position, ErrorKind kind, Object... args) { in format()
DTurbineLog.java20 import com.google.turbine.diag.TurbineError.ErrorKind;
59 if (error.kind().equals(ErrorKind.PROC) && error.severity().equals(Diagnostic.Kind.ERROR)) { in errorRaised()
78 errors.add(TurbineDiagnostic.format(severity, ErrorKind.PROC, message)); in diagnostic()
90 public void diagnostic(Diagnostic.Kind severity, int position, ErrorKind kind, Object... args) { in diagnostic()
94 public void error(int position, ErrorKind kind, Object... args) { in error()
/external/rust/crates/tokio/src/io/driver/
Dregistration.rs78 io::ErrorKind::Other, in new_with_interest_and_handle()
105 None => return Err(io::Error::new(io::ErrorKind::Other, "reactor gone")), in deregister()
180 Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => { in poll_io()
197 return Err(io::ErrorKind::WouldBlock.into()); in try_io()
201 Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => { in try_io()
203 Err(io::ErrorKind::WouldBlock.into()) in try_io()
224 io::Error::new(io::ErrorKind::Other, "IO driver has terminated") in gone()
239 io::ErrorKind::Other,
253 Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
/external/rust/crates/nom/src/combinator/
Dmacros.rs108 $vis fn $name( i: $i ) -> $crate::IResult<$i, $o, ($i, $crate::error::ErrorKind)> {
118 $vis fn $name( i: $i ) -> $crate::IResult<$i, $o, ($i, $crate::error::ErrorKind)> {
123 $vis fn $name( i: &[u8] ) -> $crate::IResult<&[u8], $o, (&[u8], $crate::error::ErrorKind)> {
128 … $vis fn $name( i: &[u8] ) -> $crate::IResult<&[u8], &[u8], (&[u8], $crate::error::ErrorKind)> {
220 $vis fn $name( i: $i ) -> $crate::IResult<$i,$o, ($i, $crate::error::ErrorKind)> {
232 $vis fn $name( i: $i ) -> $crate::IResult<$i, $o, ($i, $crate::error::ErrorKind)> {
238 $vis fn $name( i: &[u8] ) -> $crate::IResult<&[u8], $o, (&[u8], $crate::error::ErrorKind)> {
244 …s fn $name<'a>( i: &'a [u8] ) -> $crate::IResult<&[u8], &[u8], (&[u8], $crate::error::ErrorKind)> {
391 use $crate::{Err,error::ErrorKind};
624 use $crate::{Err,error::ErrorKind};
[all …]
/external/rust/crates/nom/tests/
Dcustom_errors.rs8 use nom::error::{ErrorKind,ParseError};
16 impl<'a> From<(&'a str, ErrorKind)> for CustomError {
17 fn from(error: (&'a str, ErrorKind)) -> Self { in from()
23 fn from_error_kind(_: &'a str, kind: ErrorKind) -> Self { in from_error_kind()
27 fn append(_: &'a str, kind: ErrorKind, other: CustomError) -> Self { in append() argument
/external/rust/crates/thiserror/tests/
Dtest_transparent.rs12 struct Error(ErrorKind); in test_transparent_struct()
15 enum ErrorKind { in test_transparent_struct() enum
22 let error = Error(ErrorKind::E0); in test_transparent_struct()
26 let io = io::Error::new(io::ErrorKind::Other, "oh no!"); in test_transparent_struct()
27 let error = Error(ErrorKind::from(io)); in test_transparent_struct()
/external/rust/crates/nom/src/multi/
Dmacros.rs540 use crate::error::ErrorKind;
570 Err($crate::Err::Error($crate::error::make_error($i, $crate::error::ErrorKind::Tag)))
602 assert_eq!(multi_empty(d), Err(Err::Error(error_position!(d, ErrorKind::SeparatedList)))); in separated_list()
632 assert_eq!(multi(c), Err(Err::Error(error_position!(c, ErrorKind::Tag)))); in separated_nonempty_list()
657 Err(Err::Error(error_position!(&b"abcdef"[..], ErrorKind::Many0))) in many0()
685 assert_eq!(multi(c), Err(Err::Error(error_position!(c, ErrorKind::Tag)))); in many1()
706 ErrorKind::ManyTill, in many_till()
707 error_position!(&c[..], ErrorKind::Tag) in many_till()
717 Err(Err::Error(error_position!(input, ErrorKind::Tag))) in infinite_many()
727 assert_eq!(multi1(a), Err(Err::Error(error_position!(a, ErrorKind::Tag)))); in infinite_many()
[all …]
/external/crosvm/sys_util/src/
Dwrite_zeroes.rs7 use std::io::{self, Error, ErrorKind, Seek, SeekFrom};
38 Ok(0) => return Err(Error::from(ErrorKind::WriteZero)), in write_zeroes_all()
42 .ok_or_else(|| Error::from(ErrorKind::Other))? in write_zeroes_all()
45 if e.kind() != ErrorKind::Interrupted { in write_zeroes_all()
68 Ok(0) => return Err(Error::from(ErrorKind::WriteZero)), in write_zeroes_all_at()
72 .ok_or_else(|| Error::from(ErrorKind::Other))?; in write_zeroes_all_at()
75 .ok_or_else(|| Error::from(ErrorKind::Other))?; in write_zeroes_all_at()
78 if e.kind() != ErrorKind::Interrupted { in write_zeroes_all_at()
/external/turbine/java/com/google/turbine/binder/
DConstEvaluator.java43 import com.google.turbine.diag.TurbineError.ErrorKind;
170 throw error(t.position(), ErrorKind.EXPRESSION_ERROR); in eval()
211 log.error(classTy.position(), ErrorKind.CANNOT_RESOLVE, flat.peekFirst()); in resolveClass()
215 throw error(classTy.position(), ErrorKind.UNEXPECTED_TYPE_PARAMETER, flat.peekFirst()); in resolveClass()
228 position, ErrorKind.SYMBOL_NOT_FOUND, new ClassSymbol(sym.binaryName() + '$' + bit)); in resolveNext()
280 ErrorKind.CANNOT_RESOLVE, in resolveField()
398 throw error(position, ErrorKind.OPERAND_TYPE, expr.constantTypeKind()); in unaryNegate()
410 throw error(position, ErrorKind.OPERAND_TYPE, expr.constantTypeKind()); in bitwiseComp()
426 throw error(position, ErrorKind.OPERAND_TYPE, expr.constantTypeKind()); in unaryPlus()
442 throw error(position, ErrorKind.OPERAND_TYPE, expr.constantTypeKind()); in unaryMinus()
[all …]

1234567891011