Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_APSS/Exceptions.cc

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: Exceptions.cc,v 1.3 2004/05/19 15:56:23 mmarsh Exp $
00008 //
00009 // $Log: Exceptions.cc,v $
00010 // Revision 1.3  2004/05/19 15:56:23  mmarsh
00011 // Added copyright and license statements.
00012 //
00013 // Revision 1.2  2003/11/04 22:31:45  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #include "Exceptions.h"
00019 #include <iostream>
00020 
00021 using namespace CODEX_APSS;
00022 
00023 void
00024 ExceptionBase::report() const
00025 {
00026    cerr << "At line " << m_line << " of file " << m_fname << endl;
00027    cerr << "CODEX_APSS exception: ";
00028    derivedMsg();
00029    cerr << endl;
00030 }
00031 
00032 void
00033 BadSecretNumberException::derivedMsg() const
00034 {
00035    cerr << "bad ID number for a shared secret" << endl;
00036 }
00037 
00038 void
00039 MissingRangeException::derivedMsg() const
00040 {
00041    cerr << "missing range object for subshares" << endl;
00042 }
00043 
00044 void
00045 ConflictExceptionBase::derivedMsg() const
00046 {
00047    cerr << "conflicting messages from server " << m_offender << endl;
00048    errMsg();
00049 }
00050 
00051 void
00052 InitMsgConflictException::errMsg() const
00053 {
00054    cerr << "InitMsg's with mismatched share labels" << endl;
00055    cerr << "(more detailed information available by querying object)" << endl;
00056 }
00057 
00058 void
00059 EstablishMsgConflictException::errMsg() const
00060 {
00061    cerr << "EstablishMsg's with mismatched subshare labels" << endl;
00062    cerr << "(more detailed information available by querying object)" << endl;
00063 }
00064 
00065 void
00066 ComputeMsgConflictException::errMsg() const
00067 {
00068    cerr << "ComputeMsg's with mismatched subshare labels" << endl;
00069    cerr << "(more detailed information available by querying object)" << endl;
00070 }

Generated on Fri May 6 17:39:12 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1