macro_rules! map_storage_err {
($result:expr) => { ... };
}Expand description
Macro to convert any error to a storage database error
This macro reduces boilerplate when you need to convert various error types to the standard Torii database error format.
ยงExample
use torii_core::map_storage_err;
// Instead of:
// query.execute(&pool).await.map_err(|e| Error::Storage(StorageError::Database(e.to_string())))?;
// Use:
map_storage_err!(query.execute(&pool).await)?;