@@ -17,6 +17,7 @@ impl<'a, T: StdError + 'a> AsDynError<'a> for T {
17
17
18
18
/// Diagnostics (and contexts) emitted during DWARF packaging.
19
19
#[ derive( Debug ) ]
20
+ #[ non_exhaustive]
20
21
pub enum Error {
21
22
/// Failure to read input file, this error occurs in the `Session::read_input` function
22
23
/// provided by the user of `thorin`.
@@ -67,14 +68,10 @@ pub enum Error {
67
68
ParseUnit ( gimli:: read:: Error ) ,
68
69
/// Input DWARF package has a different index version than the version being output.
69
70
IncompatibleIndexVersion ( String , u16 , u16 ) ,
70
- /// Failed to add a section to the output object.
71
- AppendSection ( object:: Error , & ' static str ) ,
72
71
/// Failed to read string offset from `.debug_str_offsets` at index.
73
72
OffsetAtIndex ( gimli:: read:: Error , u64 ) ,
74
73
/// Failed to read string from `.debug_str` at offset.
75
74
StrAtOffset ( gimli:: read:: Error , usize ) ,
76
- /// Failed to write string to string table.
77
- WritingStrToStringTable ( gimli:: write:: Error ) ,
78
75
/// Failed to parse index section. If an input file is a DWARF package, its index section needs
79
76
/// to be read to ensure that the contributions within it are preserved.
80
77
ParseIndex ( gimli:: read:: Error , String ) ,
@@ -139,10 +136,8 @@ impl StdError for Error {
139
136
Error :: ParseUnitHeader ( source) => Some ( source. as_dyn_error ( ) ) ,
140
137
Error :: ParseUnit ( source) => Some ( source. as_dyn_error ( ) ) ,
141
138
Error :: IncompatibleIndexVersion ( _, _, _) => None ,
142
- Error :: AppendSection ( source, _) => Some ( source. as_dyn_error ( ) ) ,
143
139
Error :: OffsetAtIndex ( source, _) => Some ( source. as_dyn_error ( ) ) ,
144
140
Error :: StrAtOffset ( source, _) => Some ( source. as_dyn_error ( ) ) ,
145
- Error :: WritingStrToStringTable ( source) => Some ( source. as_dyn_error ( ) ) ,
146
141
Error :: ParseIndex ( source, _) => Some ( source. as_dyn_error ( ) ) ,
147
142
Error :: UnitNotInIndex ( _) => None ,
148
143
Error :: RowNotInIndex ( source, _) => Some ( source. as_dyn_error ( ) ) ,
@@ -221,9 +216,6 @@ impl fmt::Display for Error {
221
216
section, actual, format
222
217
)
223
218
}
224
- Error :: AppendSection ( _, section) => {
225
- write ! ( f, "Failed to concatenate `{}` section from input DWARF object" , section)
226
- }
227
219
Error :: OffsetAtIndex ( _, index) => write ! (
228
220
f,
229
221
"Failed to read offset at index {} of `.debug_str_offsets.dwo` section" ,
@@ -234,9 +226,6 @@ impl fmt::Display for Error {
234
226
"Failed to read string at offset {:08x} of `.debug_str.dwo` section" ,
235
227
offset
236
228
) ,
237
- Error :: WritingStrToStringTable ( _) => {
238
- write ! ( f, "Failed to write string to in-progress `.debug_str.dwo` section" )
239
- }
240
229
Error :: ParseIndex ( _, section) => write ! ( f, "Failed to parse `{}` section" , section) ,
241
230
Error :: UnitNotInIndex ( unit) => {
242
231
write ! ( f, "Unit 0x{0:08x} from input DWARF package is not in its index" , unit)
0 commit comments