security-exception.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
23 #ifndef NDN_SECURITY_EXCEPTION_HPP
24 #define NDN_SECURITY_EXCEPTION_HPP
25 
26 #include <exception>
27 #include <string>
28 
29 namespace ndn {
30 
31 class SecurityException : public std::exception {
32 public:
33  SecurityException(const std::string& errorMessage) throw();
34 
35  virtual ~SecurityException() throw();
36 
37  std::string
38  Msg() const { return errorMessage_; }
39 
40  virtual const char*
41  what() const throw();
42 
43 private:
44  const std::string errorMessage_;
45 };
46 
48 public:
49  UnrecognizedKeyFormatException(const std::string& errorMessage)
50  : SecurityException(errorMessage)
51  {
52  }
53 };
54 
56 public:
57  UnrecognizedDigestAlgorithmException(const std::string& errorMessage)
58  : SecurityException(errorMessage)
59  {
60  }
61 };
62 
63 }
64 
65 #endif
Definition: security-exception.hpp:31
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
Definition: security-exception.hpp:55
Definition: security-exception.hpp:47