@@ -78,14 +78,14 @@ class ContentManagementBloc
78
78
emit (
79
79
state.copyWith (
80
80
headlinesStatus: ContentManagementStatus .failure,
81
- errorMessage : e.message ,
81
+ exception : e,
82
82
),
83
83
);
84
84
} catch (e) {
85
85
emit (
86
86
state.copyWith (
87
87
headlinesStatus: ContentManagementStatus .failure,
88
- errorMessage : e. toString ( ),
88
+ exception : UnknownException ( 'An unexpected error occurred: $ e ' ),
89
89
),
90
90
);
91
91
}
@@ -105,14 +105,14 @@ class ContentManagementBloc
105
105
emit (
106
106
state.copyWith (
107
107
headlinesStatus: ContentManagementStatus .failure,
108
- errorMessage : e.message ,
108
+ exception : e,
109
109
),
110
110
);
111
111
} catch (e) {
112
112
emit (
113
113
state.copyWith (
114
114
headlinesStatus: ContentManagementStatus .failure,
115
- errorMessage : e. toString ( ),
115
+ exception : UnknownException ( 'An unexpected error occurred: $ e ' ),
116
116
),
117
117
);
118
118
}
@@ -157,14 +157,14 @@ class ContentManagementBloc
157
157
emit (
158
158
state.copyWith (
159
159
topicsStatus: ContentManagementStatus .failure,
160
- errorMessage : e.message ,
160
+ exception : e,
161
161
),
162
162
);
163
163
} catch (e) {
164
164
emit (
165
165
state.copyWith (
166
166
topicsStatus: ContentManagementStatus .failure,
167
- errorMessage : e. toString ( ),
167
+ exception : UnknownException ( 'An unexpected error occurred: $ e ' ),
168
168
),
169
169
);
170
170
}
@@ -184,14 +184,14 @@ class ContentManagementBloc
184
184
emit (
185
185
state.copyWith (
186
186
topicsStatus: ContentManagementStatus .failure,
187
- errorMessage : e.message ,
187
+ exception : e,
188
188
),
189
189
);
190
190
} catch (e) {
191
191
emit (
192
192
state.copyWith (
193
193
topicsStatus: ContentManagementStatus .failure,
194
- errorMessage : e. toString ( ),
194
+ exception : UnknownException ( 'An unexpected error occurred: $ e ' ),
195
195
),
196
196
);
197
197
}
@@ -236,14 +236,14 @@ class ContentManagementBloc
236
236
emit (
237
237
state.copyWith (
238
238
sourcesStatus: ContentManagementStatus .failure,
239
- errorMessage : e.message ,
239
+ exception : e,
240
240
),
241
241
);
242
242
} catch (e) {
243
243
emit (
244
244
state.copyWith (
245
245
sourcesStatus: ContentManagementStatus .failure,
246
- errorMessage : e. toString ( ),
246
+ exception : UnknownException ( 'An unexpected error occurred: $ e ' ),
247
247
),
248
248
);
249
249
}
@@ -263,14 +263,14 @@ class ContentManagementBloc
263
263
emit (
264
264
state.copyWith (
265
265
sourcesStatus: ContentManagementStatus .failure,
266
- errorMessage : e.message ,
266
+ exception : e,
267
267
),
268
268
);
269
269
} catch (e) {
270
270
emit (
271
271
state.copyWith (
272
272
sourcesStatus: ContentManagementStatus .failure,
273
- errorMessage : e. toString ( ),
273
+ exception : UnknownException ( 'An unexpected error occurred: $ e ' ),
274
274
),
275
275
);
276
276
}
0 commit comments