7 namespace linuxdeploy {
8 namespace desktopfile {
10 * Desktop file library's base exception.
12 class DesktopFileError : public std::runtime_error {
14 explicit DesktopFileError(const std::string& message = "unknown desktop file error") : runtime_error(message) {};
18 * Exception thrown by DesktopFileReader on parsing errors.
20 class ParseError : public DesktopFileError {
22 explicit ParseError(const std::string& message = "unknown parse error") : DesktopFileError(message) {};
26 * I/O exception, thrown if files cannot be opened, reading or writing fails etc.
28 class IOError : public DesktopFileError {
30 explicit IOError(const std::string& message = "unknown I/O error") : DesktopFileError(message) {};
33 class UnknownSectionError : public DesktopFileError {
35 explicit UnknownSectionError(const std::string& section) : DesktopFileError("unknown section: " + section) {};
39 * Cast from one type to another couldn't be performed.
41 class BadLexicalCastError : public DesktopFileError {
43 BadLexicalCastError() : DesktopFileError("Bad lexical cast") {}