MCPcopy Create free account
hub / github.com/BerriAI/litellm / catch_future_panic

Function catch_future_panic

litellm-rust/crates/host-python/src/runtime.rs:204–212  ·  view source on GitHub ↗
(future: F)

Source from the content-addressed store, hash-verified

202}
203
204async fn catch_future_panic<T, E, F>(future: F) -> PyResult<Result<T, E>>
205where
206 F: Future<Output = Result<T, E>>,
207{
208 AssertUnwindSafe(future)
209 .catch_unwind()
210 .await
211 .map_err(panic_to_pyerr)
212}
213
214async fn wait_for_sync_result<T, E, F>(future: F) -> PyResult<Result<T, E>>
215where

Callers 3

run_asyncFunction · 0.85
run_async_valueFunction · 0.85
wait_for_sync_resultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected