Add some exception classes.
authorcantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Thu, 28 Dec 2006 22:31:39 +0000 (22:31 +0000)
committercantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Thu, 28 Dec 2006 22:31:39 +0000 (22:31 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@153 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0

saml/SAMLConfig.cpp
saml/exceptions.h
saml/saml2/metadata/MetadataFilter.h

index 9afed24..46ce340 100644 (file)
@@ -68,8 +68,12 @@ extern "C" void SAML_API xmltooling_extension_term()
 }
 
 DECL_XMLTOOLING_EXCEPTION_FACTORY(ArtifactException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(MetadataException,opensaml::saml2md);
 DECL_XMLTOOLING_EXCEPTION_FACTORY(MetadataFilterException,opensaml::saml2md);
 DECL_XMLTOOLING_EXCEPTION_FACTORY(BindingException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(ProfileException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(FatalProfileException,opensaml);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(RetryableProfileException,opensaml);
 
 namespace opensaml {
    SAMLInternalConfig g_config;
@@ -111,8 +115,12 @@ bool SAMLInternalConfig::init(bool initXMLTooling)
     }
 
     REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ArtifactException,opensaml);
+    REGISTER_XMLTOOLING_EXCEPTION_FACTORY(MetadataException,opensaml::saml2md);
     REGISTER_XMLTOOLING_EXCEPTION_FACTORY(MetadataFilterException,opensaml::saml2md);
     REGISTER_XMLTOOLING_EXCEPTION_FACTORY(BindingException,opensaml);
+    REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ProfileException,opensaml);
+    REGISTER_XMLTOOLING_EXCEPTION_FACTORY(FatalProfileException,opensaml);
+    REGISTER_XMLTOOLING_EXCEPTION_FACTORY(RetryableProfileException,opensaml);
 
     saml1::registerAssertionClasses();
     saml1p::registerProtocolClasses();
index b44102e..4fa991e 100644 (file)
@@ -34,6 +34,9 @@ namespace opensaml {
     };
     
     DECL_XMLTOOLING_EXCEPTION(BindingException,SAML_EXCEPTIONAPI(SAML_API),opensaml,xmltooling::XMLToolingException,Exceptions in SAML binding processing);
+    DECL_XMLTOOLING_EXCEPTION(ProfileException,SAML_EXCEPTIONAPI(SAML_API),opensaml,xmltooling::ValidationException,Exceptions in SAML profile processing);
+    DECL_XMLTOOLING_EXCEPTION(FatalProfileException,SAML_EXCEPTIONAPI(SAML_API),opensaml,ProfileException,Fatal exceptions in SAML profile processing);
+    DECL_XMLTOOLING_EXCEPTION(RetryableProfileException,SAML_EXCEPTIONAPI(SAML_API),opensaml,ProfileException,Non-fatal exceptions in SAML profile processing);
 
     /**
      * Attaches metadata-derived information as exception properties and optionally
index df01def..96abe81 100644 (file)
@@ -76,7 +76,8 @@ namespace opensaml {
         /** MetadataFilter that verifies signatures and filters out any that don't pass. */
         #define SIGNATURE_METADATA_FILTER  "org.opensaml.saml2.metadata.provider.SignatureMetadataFilter"
         
-        DECL_XMLTOOLING_EXCEPTION(MetadataFilterException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,xmltooling::XMLToolingException,Exceptions related to metadata filtering);
+        DECL_XMLTOOLING_EXCEPTION(MetadataException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,xmltooling::XMLToolingException,Exceptions related to metadata use);
+        DECL_XMLTOOLING_EXCEPTION(MetadataFilterException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,MetadataException,Exceptions related to metadata filtering);
     };
 };