Home
last modified time | relevance | path

Searched refs:CustomError (Results 1 - 5 of 5) sorted by relevance

/third_party/rust/crates/nom/examples/
H A Dcustom_error.rs9 pub enum CustomError<I> { enum
14 impl<I> ParseError<I> for CustomError<I> {
16 CustomError::Nom(input, kind) in from_error_kind()
24 pub fn parse(_input: &str) -> IResult<&str, &str, CustomError<&str>> { in parse()
25 Err(Error(CustomError::MyError)) in parse()
33 use super::CustomError;
40 Error(e) => assert_eq!(e, CustomError::MyError), in it_works()
/third_party/rust/crates/nom/src/combinator/
H A Dtests.rs93 impl From<u32> for CustomError {
95 CustomError in from()
99 impl<I> ParseError<I> for CustomError {
101 CustomError in from_error_kind()
104 fn append(_: I, _: ErrorKind, _: CustomError) -> Self { in append()
105 CustomError in append()
109 struct CustomError; structure names
111 fn custom_error(input: &[u8]) -> IResult<&[u8], &[u8], CustomError> { in custom_error()
112 //fix_error!(input, CustomError, alphanumeric) in custom_error()
/third_party/rust/crates/nom/tests/
H A Dcustom_errors.rs13 pub struct CustomError(String); structure names
15 impl<'a> From<(&'a str, ErrorKind)> for CustomError {
17 CustomError(format!("error code was: {:?}", error)) in from()
21 impl<'a> ParseError<&'a str> for CustomError { in from()
23 CustomError(format!("error code was: {:?}", kind)) in from()
26 fn append(_: &'a str, kind: ErrorKind, other: CustomError) -> Self { in append()
27 CustomError(format!("{:?}\nerror code was: {:?}", other, kind)) in append()
31 fn test1(input: &str) -> IResult<&str, &str, CustomError> { in append()
32 //fix_error!(input, CustomError, tag!("abcd")) in append()
36 fn test2(input: &str) -> IResult<&str, &str, CustomError> { in test2()
[all...]
/third_party/node/test/parallel/
H A Dtest-util-format.js452 class CustomError extends Error {
458 { value: 'CustomError', enumerable: false });
459 Error.captureStackTrace(this, CustomError);
462 const customError = new CustomError('bar');
/third_party/python/Lib/test/
H A Dtest_dataclasses.py26 class CustomError(Exception): pass class
944 raise CustomError()
945 with self.assertRaises(CustomError):
953 raise CustomError()
954 with self.assertRaises(CustomError):
964 raise CustomError()
990 raise CustomError()
1005 with self.assertRaises(CustomError):
1014 with self.assertRaises(CustomError):
4334 raise CustomError(
[all...]

Completed in 12 milliseconds