From 2c5df0fe0ecf1683bf2935d027411905035042b0 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 18 Sep 2007 21:44:21 +0000 Subject: Start adding our own exceptions. svn path=/scripts/rpki/cms.py; revision=988 --- scripts/rpki/exceptions.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scripts/rpki/exceptions.py (limited to 'scripts/rpki/exceptions.py') diff --git a/scripts/rpki/exceptions.py b/scripts/rpki/exceptions.py new file mode 100644 index 00000000..76fa4c27 --- /dev/null +++ b/scripts/rpki/exceptions.py @@ -0,0 +1,30 @@ +# $Id$ + +"""Exception definitions for RPKI modules.""" + +class NotInDatabase(Exception): + """Lookup failed for an object expected to be in the database.""" + +class BadURISyntax(Exception): + """Illegal syntax for a URI.""" + +class BadStatusCode(Exception): + """Unrecognized protocol status code.""" + +class BadQuery(Exception): + """Unexpected protocol query.""" + +class MultipleROAsFound(Exception): + """Found multiple ROAs in a relationship that should be one-to-one.""" + +class CMSVerificationFailed(Exception): + """Verification of a CMS message failed.""" + +class HTTPRequestFailed(Exception): + """HTTP request failed.""" + +class DERObjectConversionError(Exception): + """Error trying to convert a DER-based object from one representation to another.""" + +class NotACertificateChain(Exception): + """Certificates don't form a proper chain.""" -- cgit v1.2.3