libzed 1.9.9
A general-purpose library for quick and simple data manipulation.
 
Loading...
Searching...
No Matches
exceptions.hpp
1#pragma once
2
3#include "../core/string.hpp"
4
5namespace z {
6namespace file {
7
12class unreadable : public std::runtime_error {
13public:
18 unreadable(const zpath &filename) : std::runtime_error(("Unable to open "_zs + filename + " for reading.").cstring()) {}
19};
20
25class unwritable : public std::runtime_error {
26public:
31 unwritable(const zpath &filename) : std::runtime_error(("Unable to open "_zs + filename + " for writing.").cstring()) {}
32};
33
34} // namespace file
35} // namespace z
Exception thrown when a file cannot be opened for reading.
Definition exceptions.hpp:12
unreadable(const zpath &filename)
Constructor.
Definition exceptions.hpp:18
Exception thrown when a file cannot be opened for writing.
Definition exceptions.hpp:25
unwritable(const zpath &filename)
Constructor.
Definition exceptions.hpp:31