File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,9 @@ impl SingleDispatch {
186
186
state. cache . clear ( ) ;
187
187
Ok ( unbound_func)
188
188
}
189
- Err ( _) => panic ! ( "Singledispatch mutex poisoned!" ) ,
189
+ Err ( e) => Err ( PyRuntimeError :: new_err ( format ! (
190
+ "Singledispatch mutex poisoned: {e}"
191
+ ) ) ) ,
190
192
}
191
193
}
192
194
@@ -267,7 +269,9 @@ impl SingleDispatch {
267
269
268
270
state. get_or_find_impl ( py, cls)
269
271
}
270
- Err ( _) => panic ! ( "Singledispatch mutex poisoned!" ) ,
272
+ Err ( e) => Err ( PyRuntimeError :: new_err ( format ! (
273
+ "Singledispatch mutex poisoned: {e}"
274
+ ) ) ) ,
271
275
}
272
276
}
273
277
@@ -286,7 +290,7 @@ impl SingleDispatch {
286
290
. into_pyobject ( py)
287
291
{
288
292
Ok ( v) => Ok ( v. into_py_any ( py) ?) ,
289
- Err ( _ ) => Err ( PyRuntimeError :: new_err ( "" ) ) ,
293
+ Err ( e ) => Err ( e ) ,
290
294
} ,
291
295
}
292
296
} else {
You can’t perform that action at this time.
0 commit comments