You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once that issue is solved, we will need to implement that here.
Maybe it can look something like this?
// in swss-commonfncatch<T,Fn:FnOnce() -> T>(f:Fn) -> Result<T,String>{unsafe{SWSSTry_()};let ans = f();let err = unsafe{SWSSCatch()};if err.is_null(){Ok(ans)}else{Err(string_from_cstr(err))}}// in hamgrd/other library user codelet res = swss_common::catch(|| DBConnector::new(...));match res {Ok(db_connector) => { ...}Err(err_msg) => { ...}}
The text was updated successfully, but these errors were encountered:
erer1243
changed the title
Decide how to pass exceptions across the C API (tracking swss-common/
Decide how to pass exceptions across the C API (tracking swss-common/#932)
Oct 28, 2024
Main issue: sonic-net/sonic-swss-common#932
Once that issue is solved, we will need to implement that here.
Maybe it can look something like this?
The text was updated successfully, but these errors were encountered: