Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Exceptions.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file TopologyBroker
11 /// @brief top-class (Organizer) of the TopologyBroker mechanism
12 /// @detailed responsibilities:
13 /// @author Oliver Lange
14 
15 
16 #ifndef INCLUDED_protocols_topology_broker_Exceptions_hh
17 #define INCLUDED_protocols_topology_broker_Exceptions_hh
18 
19 
20 // Unit Headers
21 //#include <protocols/topology_broker/Exceptions.fwd.hh>
22 
23 // Utility Headers
24 
25 #include <utility/excn/Exceptions.hh>
26 
27 
28 namespace protocols {
29 namespace topology_broker {
30 
31 class EXCN_TopologyBroker : public virtual utility::excn::EXCN_Msg_Exception {
32  typedef EXCN_Msg_Exception Parent;
33 protected:
34  EXCN_TopologyBroker() : EXCN_Msg_Exception( "" ){};
35  virtual void show( std::ostream& os ) const {
36  os << "\n[TopologyBroker Exception]: ";
37  Parent::show( os );
38  }
39 };
40 
41 class EXCN_Input : public EXCN_TopologyBroker, public utility::excn::EXCN_BadInput {
43 public:
44  EXCN_Input( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {};
45  virtual void show( std::ostream& os ) const {
46  os << "*************** Error in Broker Setup: *************** \n";
47  Parent::show( os );
48  os << "\n\n********** Check your (inconsistent) input *************** \n";
49  }
50 };
51 
52 // this is more like a range error --- asking for something which isn't there
54 public:
55  EXCN_Unknown( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {};
56 };
57 
60 public:
61  EXCN_FailedBroking( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {};
62  virtual void show( std::ostream& os ) const {
63  Parent::show( os );
64  os << "Failed to mediate between different Claimers. " << std::endl;
65  }
66 };
67 
70 public:
71  EXCN_FilterFailed( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {};
72 
73  virtual void show( std::ostream& os ) const {
74  Parent::show( os );
75  os << "[FILTER] failed... " << std::endl;
76  }
77 
78 };
79 
80 
81 }
82 }
83 
84 #endif