Changeset 315 in pacpusframework for trunk/src/FileLib
- Timestamp:
- Jul 28, 2014, 5:11:27 PM (10 years ago)
- Location:
- trunk/src/FileLib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/FileLib/src/DbiteFile.cpp
r303 r315 129 129 // TODO: readAndDiagnoseHeader(); 130 130 close(); 131 BOOST_THROW_EXCEPTION( e132 //<< "cannot read header"131 BOOST_THROW_EXCEPTION(DbiteException("cannot read header") 132 << errinfo_api_function("open") 133 133 << errinfo_nested_exception(copy_exception(e)) 134 134 ); -
trunk/src/FileLib/test/TestFileLib.cpp
r312 r315 77 77 }; 78 78 79 template <typename ErrorInfo> 80 struct HasErrorInfo<ErrorInfo, char const*> 81 : noncopyable 82 { 83 private: 84 typedef char const* E; 85 public: 86 HasErrorInfo(E const& expectedValue) 87 : mExpectedValue(expectedValue) 88 { 89 } 90 91 bool operator()(DbiteException const& ex) 92 { 93 LOG_INFO("diagnostic_information: " << diagnostic_information(ex)); 94 E const* value = get_error_info<ErrorInfo>(ex); 95 if (!value) { 96 return false; 97 } 98 return std::string(mExpectedValue) == std::string(*value); 99 } 100 101 private: 102 E const mExpectedValue; 103 }; 104 79 105 BOOST_AUTO_TEST_SUITE(suiteBasic) 80 106
Note:
See TracChangeset
for help on using the changeset viewer.