just some more thoughts

This commit is contained in:
Blue 2023-09-20 16:45:22 -03:00
parent ec63dc655b
commit 02df7de0c3
Signed by: blue
GPG key ID: 9B203B252A63EE38
11 changed files with 163 additions and 143 deletions

View file

@ -30,30 +30,17 @@ private:
std::map<std::string, std::filesystem::path> successSources; //would be nice to have a bimap here
};
class Collection::UnknownSource : public std::exception {
class Collection::UnknownSource : public std::runtime_error {
public:
UnknownSource(const std::string& source);
const char* what() const noexcept( true ) override;
private:
std::string source;
explicit UnknownSource(const std::string& source);
};
class Collection::DuplicateSource : public std::exception {
class Collection::DuplicateSource : public std::runtime_error {
public:
DuplicateSource(const std::string& source);
const char* what() const noexcept( true ) override;
private:
std::string source;
explicit DuplicateSource(const std::string& source);
};
class Collection::DuplicatePath : public std::exception {
class Collection::DuplicatePath : public std::runtime_error {
public:
DuplicatePath(const std::string& source, const std::filesystem::path& path);
const char* what() const noexcept( true ) override;
private:
std::string source;
std::filesystem::path path;
explicit DuplicatePath(const std::string& source, const std::filesystem::path& path);
};