Jeff Thompson | a92861a | 2013-10-16 14:06:23 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 6 | * See COPYING for copyright and distribution information. |
| 7 | */ |
| 8 | |
| 9 | #ifndef NDN_DER_EXCEPTION_HPP |
| 10 | #define NDN_DER_EXCEPTION_HPP |
| 11 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame^] | 12 | #include <stdexcept> |
Jeff Thompson | a92861a | 2013-10-16 14:06:23 -0700 | [diff] [blame] | 13 | #include <string> |
| 14 | |
| 15 | namespace ndn { |
| 16 | |
| 17 | namespace der { |
| 18 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame^] | 19 | struct DerException : public std::runtime_error { DerException(const std::string &msg) : std::runtime_error(msg) {} }; |
Jeff Thompson | a92861a | 2013-10-16 14:06:23 -0700 | [diff] [blame] | 20 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame^] | 21 | class NegativeLengthException : public DerException { NegativeLengthException(const std::string &msg) : DerException(msg) {} }; |
Jeff Thompson | a92861a | 2013-10-16 14:06:23 -0700 | [diff] [blame] | 22 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame^] | 23 | class DerEncodingException : public DerException { DerEncodingException(const std::string &msg) : DerException(msg) {} }; |
Jeff Thompson | a92861a | 2013-10-16 14:06:23 -0700 | [diff] [blame] | 24 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame^] | 25 | class DerDecodingException : public DerException { DerDecodingException(const std::string &msg) : DerException(msg) {} }; |
Jeff Thompson | a92861a | 2013-10-16 14:06:23 -0700 | [diff] [blame] | 26 | |
| 27 | } // der |
| 28 | |
| 29 | } |
| 30 | |
| 31 | #endif |