File: Exceptions.h

package info (click to toggle)
xdg-utils-cxx 1.0.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 456 kB
  • sloc: cpp: 2,461; ansic: 10; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 967 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

// system
#include <stdexcept>

namespace XdgUtils {
    namespace DesktopEntry {
        class DesktopEntryError : public std::runtime_error {
        public:
            explicit DesktopEntryError(const std::string& what) : std::runtime_error(what) {}
        };

        class ReadError : public DesktopEntryError {
        public:
            explicit ReadError(const std::string& what) : DesktopEntryError(what) {}
        };

        class ParseError : public DesktopEntryError {
        public:
            explicit ParseError(const std::string& what) : DesktopEntryError(what) {}
        };

        class MalformedPathError : public DesktopEntryError {
        public:
            explicit MalformedPathError(const std::string& what) : DesktopEntryError(what) {}
        };

        class BadCast : public DesktopEntryError {
        public:
            explicit BadCast(const std::string& what) : DesktopEntryError(what) {}
        };
    }
}