panicked at 'called `Result::unwrap()` on an `Err` value: Error { message: "Invalid decimal: no digits found" }'
Closed this issue · 3 comments
charlesxsh commented
Input
)3..6)�6/.6S66666?.6i.666666666666i.66:.6i.66666?6L.6�6G.6?6')366I66660666666666666?6')366I6666066H
Output
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { message: "Invalid decimal: no digits found" }', /home/xsh/.cargo/registry/src/github.com-1ecc6299db9ec823/dtparse-1.2.0/src/lib.rs:1290:34
stack backtrace:
0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: std::panicking::rust_panic_with_hook
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: core::result::Result<T,E>::unwrap
at /home/xsh/code/rust-compiler/src/libcore/result.rs:1005
10: dtparse::Parser::to_decimal
at /home/xsh/.cargo/registry/src/github.com-1ecc6299db9ec823/dtparse-1.2.0/src/lib.rs:1290
11: dtparse::Parser::parse_numeric_token
at /home/xsh/.cargo/registry/src/github.com-1ecc6299db9ec823/dtparse-1.2.0/src/lib.rs:1105
12: dtparse::Parser::parse_with_tokens
at /home/xsh/.cargo/registry/src/github.com-1ecc6299db9ec823/dtparse-1.2.0/src/lib.rs:771
13: dtparse::Parser::parse
at /home/xsh/.cargo/registry/src/github.com-1ecc6299db9ec823/dtparse-1.2.0/src/lib.rs:719
Expect
return error properly instead of panic
bspeice commented
Can you please provide the input string as a hexadecimal list or base64 format? I can't properly retrieve the text from Github Issues like this.
charlesxsh commented
bspeice commented
Does not currently panic, and we now test for it.