-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Can we have a Macro to do the open and assign. Also, since we return a Future, can this be async?
Somehting like ASSIGN OR RETURN
auto dsRes = mdio::Dataset::Open(dataset_path, mdio::constants::kOpen);
if (!dsRes.status().ok()) {
return dsRes.status();
}
mdio::Dataset ds = dsRes.value();
Is there a macro for this pattern, it's fine but I makes for more reading.
if (!spec.status().ok()) {
// Something went wrong with Tensorstore retrieving the spec
return spec.status();
}
auto specJsonResult = spec.value().ToJson(IncludeDefaults{});
if (!specJsonResult.status().ok()) {
return specJsonResult.status();
}
Originally posted by @blasscoc in #115 (comment)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request