00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "ServerExceptions.h"
00019 #include <iostream>
00020
00021 using namespace CODEX_Server;
00022
00023 void
00024 ExceptionBase::report() const
00025 {
00026 cerr << "At line " << m_line << " of file " << m_fname << endl;
00027 cerr << "CODEX_Server exception: ";
00028 derivedMsg();
00029 cerr << endl;
00030 }
00031
00032 void
00033 PublicKeyNotFoundException::derivedMsg() const
00034 {
00035 cerr << "Public key not found";
00036 }
00037
00038 void
00039 CertificateNotFoundException::derivedMsg() const
00040 {
00041 cerr << "Certificate not found";
00042 }
00043
00044 void
00045 SignatureVerificationFailedException::derivedMsg() const
00046 {
00047 cerr << "Signature verification failed";
00048 }
00049
00050 void
00051 NoQuorumSystemException::derivedMsg() const
00052 {
00053 cerr << "Quorum system not initialized";
00054 }
00055
00056 void
00057 KeySharesNotFoundException::derivedMsg() const
00058 {
00059 cerr << "Private key shares not found";
00060 }
00061
00062 void
00063 MalformedMessageException::derivedMsg() const
00064 {
00065 cerr << "Malformed message";
00066 }
00067
00068 void
00069 UnknownSecretNumberException::derivedMsg() const
00070 {
00071 cerr << "Unknown secret number " << m_num;
00072 }
00073
00074 void
00075 InvalidLabelException::derivedMsg() const
00076 {
00077 cerr << "Invalid share label";
00078 }