sac-format 0.6.0
C++20 SAC (Seismic Analysis Code) File Library
Loading...
Searching...
No Matches
sacfmt::io_error Class Reference

Class for generic I/O exceptions. More...

#include <sac_format.hpp>

Inheritance diagram for sacfmt::io_error:
Collaboration diagram for sacfmt::io_error:

Public Member Functions

 io_error (std::string msg)
 io_error Constructor
 
const charwhat () const noexcept override
 Error message delivery.
 

Private Attributes

const std::string message {}
 Error message.
 

Detailed Description

Class for generic I/O exceptions.

These errors occur due to bad path, bad permissions, or otherwise corrupt SAC-files.

I/O operations may raise other exceptions (disk failure, out of space, etc.), but those are difficult to emulate for testing purposes (therefore I am unable to reliably cover them); they also arise due to conditions that would render how sac-format handles them moot.

Constructor & Destructor Documentation

◆ io_error()

sacfmt::io_error::io_error(std::string msg)
inlineexplicit

io_error Constructor

Parameters
[in]msgstd::string Error message.
1435: message(std::move(msg)) {}
const std::string message
Error message.
Definition sac_format.hpp:1427

Member Function Documentation

◆ what()

const char * sacfmt::io_error::what()const
inlineoverridenoexcept

Error message delivery.

Returns
what char* Error message.
1441 {
1442 return message.c_str();
1443 }

Member Data Documentation

◆ message

const std::string sacfmt::io_error::message {}
private

Error message.

1427{};

The documentation for this class was generated from the following file: