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 protocols/loophash/Exceptions.hh
11 /// @detailed responsibilities:
12 /// @author Ken Jung
13 /// @author Christopher Miles (cmiles@uw.edu)
14 #ifndef INCLUDED_protocols_loophash_Exceptions_HH
15 #define INCLUDED_protocols_loophash_Exceptions_HH
16 
17 // Project headers
18 #include <core/types.hh>
19 
20 // Utility Headers
21 #include <utility/excn/Exceptions.hh>
22 #include <utility/string_util.hh>
23 
24 // C/C++
25 #include <string>
26 
27 #include <utility/vector1.hh>
28 
29 
30 namespace protocols {
31 namespace loophash {
32 
33 class EXCN_DB_IO_Failed: public utility::excn::EXCN_Msg_Exception {
34  public:
36  utility::excn::EXCN_Msg_Exception( "Error in opening File='" + filename + "' for operation='" + action + "'" ),
37  filename_( filename ), action_( action ) {};
38 
39  private:
42 };
43 
44 class EXCN_Invalid_Hashmap: public utility::excn::EXCN_Msg_Exception {
45  public:
47  utility::excn::EXCN_Msg_Exception( "Invalid hashmap of size " + utility::to_string( size ) + " requested." ),
48  size_( size ) {};
49 
50  private:
52 };
53 
54 class EXCN_No_Extra_Data_To_Write: public utility::excn::EXCN_Msg_Exception {
55  public:
57  utility::excn::EXCN_Msg_Exception( "Cannot write DB with extras if extra data is nonexistent." ) {};
58 };
59 
60 class EXCN_Wrong_DB_Format: public utility::excn::EXCN_Msg_Exception {
61  public:
63  utility::excn::EXCN_Msg_Exception( filename + " does not have the correct format." ),
64  filename_( filename ) {};
65 
66  private:
68 };
69 
70 class EXCN_bbdb_Merge_Failed: public utility::excn::EXCN_Msg_Exception {
71  public:
73  utility::excn::EXCN_Msg_Exception( reason ) {};
74 
75  EXCN_bbdb_Merge_Failed( bool masterlib_extra, bool secondlib_extra ):
76  utility::excn::EXCN_Msg_Exception( "LoopHashLibrary.extra_'s not equal" ),
77  masterlib_extra_( masterlib_extra ),
78  secondlib_extra_( secondlib_extra ) {};
79 
80  private:
81  bool masterlib_extra_;
83 };
84 
85 } //namespace loophash
86 } //namespace protocols
87 
88 #endif