Add io stream end errors
This commit is contained in:
parent
e4f212c44f
commit
142d15fdcb
2 changed files with 22 additions and 0 deletions
|
|
@ -21,4 +21,16 @@ namespace psemek::io
|
||||||
char const * what() const noexcept override;
|
char const * what() const noexcept override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct istream_end
|
||||||
|
: std::exception
|
||||||
|
{
|
||||||
|
char const * what() const noexcept override;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ostream_end
|
||||||
|
: std::exception
|
||||||
|
{
|
||||||
|
char const * what() const noexcept override;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,14 @@ namespace psemek::io
|
||||||
return "Attempt to write to null output stream";
|
return "Attempt to write to null output stream";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char const * istream_end::what() const noexcept
|
||||||
|
{
|
||||||
|
return "Unexpected input stream end";
|
||||||
|
}
|
||||||
|
|
||||||
|
char const * ostream_end::what() const noexcept
|
||||||
|
{
|
||||||
|
return "Unexpected output stream end";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue