xorp

exceptions.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 // vim:set sts=4 ts=8 sw=4:
00003 
00004 // Copyright (c) 2001-2009 XORP, Inc.
00005 //
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License, Version 2, June
00008 // 1991 as published by the Free Software Foundation. Redistribution
00009 // and/or modification of this program under the terms of any other
00010 // version of the GNU General Public License is not permitted.
00011 // 
00012 // This program is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00015 // see the GNU General Public License, Version 2, a copy of which can be
00016 // found in the XORP LICENSE.gpl file.
00017 // 
00018 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00019 // http://xorp.net
00020 
00021 // $XORP: xorp/contrib/olsr/exceptions.hh,v 1.3 2008/10/02 21:56:34 bms Exp $
00022 
00023 #ifndef __OLSR_EXCEPTIONS_HH__
00024 #define __OLSR_EXCEPTIONS_HH__
00025 
00026 /*
00027  * @short The exception thrown when an operation on an external
00028  *        route fails.
00029  */
00030 class BadExternalRoute : public XorpReasonedException {
00031 public:
00032     BadExternalRoute(const char* file, size_t line, const string& init_why = "")
00033      : XorpReasonedException("OlsrBadExternalRoute", file, line, init_why) {}
00034 };
00035 
00040 class BadFace : public XorpReasonedException {
00041 public:
00042     BadFace(const char* file, size_t line, const string& init_why = "")
00043      : XorpReasonedException("OlsrBadFace", file, line, init_why) {}
00044 };
00045 
00051 class BadLinkCode : public XorpReasonedException {
00052 public:
00053     BadLinkCode(const char* file, size_t line, const string& init_why = "")
00054      : XorpReasonedException("OlsrBadLinkCode", file, line, init_why) {}
00055 };
00056 
00060 class BadLogicalLink : public XorpReasonedException {
00061 public:
00062     BadLogicalLink(const char* file, size_t line, const string& init_why = "")
00063      : XorpReasonedException("OlsrBadLogicalLink", file, line, init_why) {}
00064 };
00065 
00070 class BadLinkCoverage : public XorpReasonedException {
00071 public:
00072     BadLinkCoverage(const char* file, size_t line, const string& init_why = "")
00073      : XorpReasonedException("OlsrBadLinkCoverage", file, line, init_why) {}
00074 };
00075 
00079 class BadMidEntry : public XorpReasonedException {
00080 public:
00081     BadMidEntry(const char* file, size_t line, const string& init_why = "")
00082      : XorpReasonedException("OlsrBadMidEntry", file, line, init_why) {}
00083 };
00084 
00089 class BadNeighbor : public XorpReasonedException {
00090 public:
00091     BadNeighbor(const char* file, size_t line, const string& init_why = "")
00092      : XorpReasonedException("OlsrBadNeighbor", file, line, init_why) {}
00093 };
00094 
00099 class BadTopologyEntry : public XorpReasonedException {
00100 public:
00101     BadTopologyEntry(const char* file, size_t line,
00102               const string& init_why = "")
00103      : XorpReasonedException("OlsrBadTopologyEntry", file, line, init_why) {}
00104 };
00105 
00114 class BadTwoHopCoverage : public XorpReasonedException {
00115 public:
00116     BadTwoHopCoverage(const char* file, size_t line,
00117               const string& init_why = "")
00118      : XorpReasonedException("OlsrBadTwoHopCoverage", file, line, init_why) {}
00119 };
00120 
00125 class BadTwoHopLink : public XorpReasonedException {
00126 public:
00127     BadTwoHopLink(const char* file, size_t line, const string& init_why = "")
00128      : XorpReasonedException("OlsrBadTwoHopLink", file, line, init_why) {}
00129 };
00130 
00135 class BadTwoHopNode : public XorpReasonedException {
00136 public:
00137     BadTwoHopNode(const char* file, size_t line, const string& init_why = "")
00138      : XorpReasonedException("OlsrBadTwoHopNode", file, line, init_why) {}
00139 };
00140 
00145 class InvalidMessage : public XorpReasonedException {
00146 public:
00147     InvalidMessage(const char* file, size_t line, const string& init_why = "")
00148     : XorpReasonedException("OlsrInvalidMessage", file, line, init_why) {}
00149 };
00150 
00155 class InvalidLinkTuple : public XorpReasonedException {
00156 public:
00157     InvalidLinkTuple(const char* file, size_t line,
00158              const string& init_why = "")
00159     : XorpReasonedException("OlsrInvalidLinkTuple", file, line, init_why)
00160     {}
00161 };
00162 
00163 #endif // __OLSR_EXCEPTIONS_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations