Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XSECException.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * XSECException:= How we throw exceptions in XSEC
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: XSECException.hpp,v 1.18 2005/02/03 13:26:30 milan Exp $
00025  *
00026  */
00027 
00028 #ifndef XSECEXCEPTION_INCLUDE
00029 #define XSECEXCEPTION_INCLUDE
00030 
00031 #include <xsec/framework/XSECDefs.hpp>
00032 
00048 class DSIG_EXPORT XSECException {
00049 
00050 public:
00051 
00059     enum XSECExceptionType {
00060 
00061         None                        = 0,
00062         MemoryAllocationFail        = 1,
00063         NoHashFoundInDigestValue    = 2,
00064         UnknownDSIGAttribute        = 3,
00065         ExpectedDSIGChildNotFound   = 4,
00066         UnknownTransform            = 5,
00067         TransformInputOutputFail    = 6,
00068         IDNotFoundInDOMDoc          = 7,
00069         UnsupportedXpointerExpr     = 8,
00070         XPathError                  = 9,
00071         XSLError                    = 10,
00072         Unsupported                 = 11,
00073         LoadEmptySignature          = 12,
00074         LoadNonSignature            = 13,
00075         UnknownCanonicalization     = 14,
00076         UnknownSignatureAlgorithm   = 15,
00077         LoadEmptyX509               = 16,
00078         LoadNonX509                 = 17,
00079         OpenSSLError                = 18,
00080         SigVfyError                 = 19,
00081         LoadEmptySignedInfo         = 20,
00082         LoadNonSignedInfo           = 21,
00083         ExpectedReferenceURI        = 22,
00084         NotLoaded                   = 23,
00085         CryptoProviderError         = 24,
00086         KeyInfoError                = 25,
00087         SigningError                = 26,
00088         LoadEmptyInfoName           = 27,
00089         LoadNonInfoName             = 28,
00090         UnknownKeyValue             = 29,
00091         SignatureCreationError      = 30,
00092         ErrorOpeningURI             = 31,
00093         ProviderError               = 32,
00094         InternalError               = 33,
00095         EnvelopeError               = 34,
00096         UnsupportedFunction         = 35,
00097         TransformError              = 36,
00098         SafeBufferError             = 37,
00099         HTTPURIInputStreamError     = 38,
00100         LoadEmptyXPathFilter        = 39,
00101         XPathFilterError            = 40,
00102         DNameDecodeError            = 41,
00103 
00104         // Encryption errors
00105         EncryptedTypeError          = 42,
00106         ExpectedXENCChildNotFound   = 43,
00107         CipherDataError             = 44,
00108         CipherValueError            = 45,
00109         CipherError                 = 46,
00110         AlgorithmMapperError        = 47,
00111         EncryptionMethodError       = 48,
00112         CipherReferenceError        = 49,
00113         ObjectError                 = 50,
00114 
00115         // XKMS Error
00116         XKMSError                   = 51,
00117         ExpectedXKMSChildNotFound   = 52,
00118         MessageAbstractTypeError    = 53,
00119         RequestAbstractTypeError    = 54,
00120         ResultTypeError             = 55,
00121         StatusError                 = 56,
00122         UnknownError                = 58        // Must be last!
00123 
00124     };
00125 
00128 
00139     XSECException(XSECExceptionType eNum, const XMLCh * inMsg = NULL);
00140 
00151     XSECException(XSECExceptionType eNum, const char * inMsg);
00152 
00153     // XSECException(XSECExceptionType eNum, safeBuffer &inMsg);
00154     
00159     XSECException(const XSECException &toCopy);
00164     ~XSECException();
00165     
00167 
00170 
00179     const XMLCh * getMsg(void);
00180 
00190     XSECExceptionType getType(void);
00191 
00192 private:
00193 
00194     XMLCh               * msg;              // Message to the caller
00195     XSECExceptionType   type;               // Type of exception
00196     
00197     /* Unimplemented Constructor */
00198     XSECException();
00199 
00200 
00201 };
00202 
00205 #endif /* XSECEXCEPTION_INCLUDE */

Generated on Sun Jul 3 17:37:28 2005 for XML-Security-C by  doxygen 1.4.2