MCPcopy Create free account
hub / github.com/Cantera/cantera / writeAttributes

Method writeAttributes

src/base/Storage.cpp:367–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367void Storage::writeAttributes(const string& id, const AnyMap& meta)
368{
369 try {
370 checkGroupWrite(id, false);
371 h5::Group sub = m_file->getGroup(id);
372 writeH5Attributes(sub, meta);
373 } catch (const Cantera::NotImplementedError& err) {
374 throw NotImplementedError("Storage::writeAttribute",
375 "{} in group '{}'.", err.getMessage(), id);
376 } catch (const CanteraError& err) {
377 // rethrow with public method attribution
378 throw CanteraError("Storage::writeAttributes", "{}", err.getMessage());
379 } catch (const std::exception& err) {
380 // convert HighFive exception
381 throw CanteraError("Storage::writeAttributes",
382 "Encountered exception for group '{}':\n{}", id, err.what());
383 }
384}
385
386AnyValue Storage::readData(const string& id,
387 const string& name, size_t rows, size_t cols) const

Callers 3

TESTFunction · 0.80
writeHeaderMethod · 0.80
writeEntryMethod · 0.80

Calls 5

writeH5AttributesFunction · 0.85
NotImplementedErrorClass · 0.85
CanteraErrorClass · 0.85
whatMethod · 0.80
getMessageMethod · 0.45

Tested by 1

TESTFunction · 0.64