File tree Expand file tree Collapse file tree 2 files changed +30
-20
lines changed Expand file tree Collapse file tree 2 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -162,17 +162,22 @@ And this is the output you'll get if you run this program:
162
162
<img src="https://raw.githubusercontent.com/zkat/miette/main/images/single-line-example.png " alt="
163
163
Narratable printout:
164
164
\
165
- Error: Types mismatched for operation.
166
- Diagnostic severity: error
167
- Begin snippet starting at line 1, column 1
165
+ diagnostic error code: oops::my::bad (link)
166
+ Error: oops!
167
+
168
+ \
169
+ Begin snippet for bad_file.rs starting
170
+ at line 2, column 3
171
+ \
172
+ snippet line 1: source
173
+
174
+ \
175
+ snippet line 2: text
176
+ highlight starting at line 1, column 3: This bit here
177
+ \
178
+ snippet line 3: here
168
179
\
169
- snippet line 1: 3 + " ; 5" ;
170
- label starting at line 1, column 1: int
171
- label starting at line 1, column 1: doesn't support these values.
172
- label starting at line 1, column 1: string
173
- diagnostic help: Change int or string to be the right types and try again.
174
- diagnostic code: nu::parser::unsupported_operation
175
- For more details, see https://docs.rs/nu-parser/0.1.0/nu-parser/enum.ParseError.html#variant.UnsupportedOperation">
180
+ diagnostic help: try doing it better next time?">
176
181
177
182
### Using
178
183
Original file line number Diff line number Diff line change 161
161
//! <img src="https://raw.githubusercontent.com/zkat/miette/main/images/single-line-example.png" alt="
162
162
//! Narratable printout:
163
163
//! \
164
- //! Error: Types mismatched for operation.
165
- //! Diagnostic severity: error
166
- //! Begin snippet starting at line 1, column 1
164
+ //! diagnostic error code: oops::my::bad (link)
165
+ //! Error: oops!
166
+ //!
167
167
//! \
168
- //! snippet line 1: 3 + "5"
169
- //! label starting at line 1, column 1: int
170
- //! label starting at line 1, column 1: doesn't support these values.
171
- //! label starting at line 1, column 1: string
172
- //! diagnostic help: Change int or string to be the right types and try again.
173
- //! diagnostic code: nu::parser::unsupported_operation
174
- //! For more details, see https://docs.rs/nu-parser/0.1.0/nu-parser/enum.ParseError.html#variant.UnsupportedOperation">
168
+ //! Begin snippet for bad_file.rs starting
169
+ //! at line 2, column 3
170
+ //! \
171
+ //! snippet line 1: source
172
+ //!
173
+ //! \
174
+ //! snippet line 2: text
175
+ //! highlight starting at line 1, column 3: This bit here
176
+ //! \
177
+ //! snippet line 3: here
178
+ //! \
179
+ //! diagnostic help: try doing it better next time?">
175
180
//!
176
181
//! ## Using
177
182
//!
You can’t perform that action at this time.
0 commit comments