X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FMyCounterRecorder.cpp;fp=example%2Fdiameter%2Flauncher%2FMyCounterRecorder.cpp;h=3d6efab65791c433fbcb5ec2caecda77dbaee135;hp=fd29422a634d592da9f602c11d2bda738b0d73b2;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/example/diameter/launcher/MyCounterRecorder.cpp b/example/diameter/launcher/MyCounterRecorder.cpp index fd29422..3d6efab 100644 --- a/example/diameter/launcher/MyCounterRecorder.cpp +++ b/example/diameter/launcher/MyCounterRecorder.cpp @@ -15,7 +15,7 @@ MyCounterRecorder::MyCounterRecorder(const std::string &fnp) : a_stream(-1), a_f } // pure virtual definitions: -void MyCounterRecorder::open() throw(anna::RuntimeException) { +void MyCounterRecorder::open() noexcept(false) { static char str [256]; const time_t now = ::time(NULL); struct tm tmNow; @@ -46,7 +46,7 @@ void MyCounterRecorder::open() throw(anna::RuntimeException) { a_fixedLine = str; } -void MyCounterRecorder::apply(const anna::oam::Counter& counter) throw(anna::RuntimeException) { +void MyCounterRecorder::apply(const anna::oam::Counter& counter) noexcept(false) { static char line [356]; anna::oam::Counter::type_t value = counter; sprintf(line, "%s|%06d|%07u|%s\n", a_fixedLine.c_str(), counter.getReference(), value, counter.getName().c_str()); @@ -55,7 +55,7 @@ void MyCounterRecorder::apply(const anna::oam::Counter& counter) throw(anna::Run throw RuntimeException(anna::functions::asString("Error writting to file '%s'; errno = %d", a_fileName.c_str(), errno), ANNA_FILE_LOCATION); } -void MyCounterRecorder::close() throw() { +void MyCounterRecorder::close() { if(a_stream != -1) { ::close(a_stream); a_stream = -1; @@ -65,7 +65,7 @@ void MyCounterRecorder::close() throw() { a_previousTime = ::time(NULL); } -std::string MyCounterRecorder::asString() const throw() { +std::string MyCounterRecorder::asString() const { std::string result = "Physical counters dump at file '"; result += a_fileName; result += "'. Another way to see counters: context dump (kill -10 ";