karazeh
A cross-platform software updating library.
exception.hpp
Go to the documentation of this file.
1 
21 #ifndef H_KARAZEH_EXCEPTION_H
22 #define H_KARAZEH_EXCEPTION_H
23 
24 #include <exception>
25 #include <string>
26 #include <stdexcept>
27 #include "karazeh_export.h"
28 
29 namespace kzh {
34  class invalid_resource : public std::runtime_error {
35  public:
36  inline invalid_resource(const std::string& uri)
37  : std::runtime_error(uri)
38  { }
39  };
40 
45  class invalid_manifest : public std::runtime_error {
46  public:
47  inline invalid_manifest(const std::string& s)
48  : std::runtime_error(s)
49  { }
50  };
51 
55  class invalid_state : public std::runtime_error {
56  public:
57  inline invalid_state(const std::string& s)
58  : std::runtime_error(s)
59  { }
60  };
61 
62  class manifest_error : public std::runtime_error {
63  public:
64  inline manifest_error(std::string const& s, std::string const& prefix = "")
65  : std::runtime_error("Manifest error: " + prefix + ": " + s)
66  { }
67  };
68 
69 } // end of namespace kzh
70 
71 #endif // H_KARAZEH_EXCEPTION_H
manifest_error(std::string const &s, std::string const &prefix="")
Definition: exception.hpp:64
Definition: exception.hpp:45
Definition: exception.hpp:34
invalid_resource(const std::string &uri)
Definition: exception.hpp:36
invalid_manifest(const std::string &s)
Definition: exception.hpp:47
Definition: exception.hpp:55
Definition: exception.hpp:62
Definition: config.hpp:27
invalid_state(const std::string &s)
Definition: exception.hpp:57