Better error handling using do (#5890)

* adds `capture-errors` flag for `do`

* adds `get-type` core command to get type

* fmt

* add tests in example

* fmt

* fix tests

* manually revert previous changes related to `get-type`

* adds method to check for error name using `into string`

* fix clippy
This commit is contained in:
pwygab
2022-06-30 09:01:34 +08:00
committed by GitHub
parent 6ee13126f7
commit a0db4ce747
8 changed files with 62 additions and 4 deletions

View File

@ -2670,6 +2670,7 @@ pub fn parse_shape_name(
b"record" => SyntaxShape::Record,
b"list" => SyntaxShape::List(Box::new(SyntaxShape::Any)),
b"table" => SyntaxShape::Table,
b"error" => SyntaxShape::Error,
_ => {
if bytes.contains(&b'@') {
let str = String::from_utf8_lossy(bytes);