Merge #6335
6335: Fix panic context r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ impl<'a> RequestDispatcher<'a> {
|
||||
};
|
||||
let world = panic::AssertUnwindSafe(&mut *self.global_state);
|
||||
let response = panic::catch_unwind(move || {
|
||||
stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params));
|
||||
let _pctx = stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params));
|
||||
let result = f(world.0, params);
|
||||
result_to_response::<R>(id, result)
|
||||
})
|
||||
@@ -64,7 +64,7 @@ impl<'a> RequestDispatcher<'a> {
|
||||
let world = self.global_state.snapshot();
|
||||
|
||||
move || {
|
||||
let _ctx =
|
||||
let _pctx =
|
||||
stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params));
|
||||
let result = f(world, params);
|
||||
Task::Response(result_to_response::<R>(id, result))
|
||||
@@ -160,7 +160,7 @@ impl<'a> NotificationDispatcher<'a> {
|
||||
return Ok(self);
|
||||
}
|
||||
};
|
||||
stdx::panic_context::enter(format!("notification: {}", N::METHOD));
|
||||
let _pctx = stdx::panic_context::enter(format!("notification: {}", N::METHOD));
|
||||
f(self.global_state, params)?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user