}
// 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;
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());
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;
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 <pid>";