activemq-cpp-3.4.0

src/main/decaf/security/SignatureException.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef _DECAF_SECURITY_SIGNATUREEXCEPTION_H_
00019 #define _DECAF_SECURITY_SIGNATUREEXCEPTION_H_
00020 
00021 #include <decaf/util/Config.h>
00022 #include <decaf/security/GeneralSecurityException.h>
00023 
00024 namespace decaf{
00025 namespace security{
00026 
00027     /*
00028      * Generic signature exception.
00029      */
00030     class DECAF_API SignatureException : public GeneralSecurityException
00031     {
00032     public:
00033 
00037         SignatureException() throw() {};
00038 
00044         SignatureException(const Exception& ex) throw()
00045         : Exception()
00046         {
00047             *(Exception*)this = ex;
00048         }
00049 
00055         SignatureException(const SignatureException& ex) throw()
00056         : Exception()
00057         {
00058             *(Exception*)this = ex;
00059         }
00060 
00071         SignatureException( const char* file, const int lineNumber,
00072                           const std::exception* cause,
00073                           const char* msg, ... ) throw() : Exception( cause )
00074         {
00075             va_list vargs;
00076             va_start( vargs, msg );
00077             buildMessage( msg, vargs );
00078 
00079             // Set the first mark for this exception.
00080             setMark( file, lineNumber );
00081         }
00082 
00088         SignatureException( const std::exception* cause ) throw() : Exception( cause ) {}
00089 
00104         SignatureException( const char* file,
00105                             const int lineNumber,
00106                             const char* msg, ...) throw()
00107         : Exception()
00108         {
00109             va_list vargs;
00110             va_start( vargs, msg );
00111             buildMessage( msg, vargs );
00112 
00113             // Set the first mark for this exception.
00114             setMark( file, lineNumber );
00115         }
00116 
00124         virtual SignatureException* clone() const{
00125             return new SignatureException(*this);
00126         }
00127 
00128         virtual ~SignatureException() throw() {}
00129 
00130    };
00131 
00132 }}
00133 
00134 #endif /*_DECAF_SECURITY_SIGNATUREEXCEPTION_H_*/