3.8 Error Handling and Resource Limits

SDDS++ reports failures with exceptions and does not maintain a process-global error stack. All exceptions derive from sdds::Error:

The base exception records an ErrorKind and, when available, the path, one-based page number, field name, zero-based row, and byte offset. A typical top-level handler is:

try {  
  auto reader = sdds::Reader::open(inputPath);  
  process(reader);  
} catch (const sdds::Error &error) {  
  std::cerr << error.what() << ’\n’;  
  return 1;  
}

ReaderLimits bounds rows per page, elements per field, string bytes, header-command bytes, include depth, projected fields, cached page-index entries, decompressed bytes, and transformation output. Applications reading untrusted files should set limits appropriate to their workload. Malformed content is fatal. Recovery applies only to a recoverably truncated final page and must be selected through ReaderOptions::recovery; a recovered page is identified by Page::recovered().