| 365 | } |
| 366 | |
| 367 | void 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 | |
| 386 | AnyValue Storage::readData(const string& id, |
| 387 | const string& name, size_t rows, size_t cols) const |