diff --git a/tests/limited-io.cpp b/tests/limited-io.cpp
index ec62041..dfc1a09 100644
--- a/tests/limited-io.cpp
+++ b/tests/limited-io.cpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -24,6 +24,8 @@
  */
 
 #include "limited-io.hpp"
+#include "core/extended-error-message.hpp"
+#include "core/global-io.hpp"
 #include "core/logger.hpp"
 
 namespace nfd {
@@ -34,17 +36,10 @@
 const int LimitedIo::UNLIMITED_OPS = std::numeric_limits<int>::max();
 const time::nanoseconds LimitedIo::UNLIMITED_TIME = time::nanoseconds::min();
 
-LimitedIo::LimitedIo()
-  : m_uttf(nullptr)
-  , m_isRunning(false)
-  , m_nOpsRemaining(0)
-{
-}
-
 LimitedIo::LimitedIo(UnitTestTimeFixture* uttf)
   : m_uttf(uttf)
-  , m_isRunning(false)
   , m_nOpsRemaining(0)
+  , m_isRunning(false)
 {
 }
 
@@ -74,17 +69,18 @@
       m_uttf->advanceClocks(tick, time::nanoseconds::max());
     }
   }
-  catch (StopException&) {
+  catch (const StopException&) {
   }
-  catch (std::exception& ex) {
+  catch (const std::exception& ex) {
+    NFD_LOG_ERROR("g_io.run() exception: " << getExtendedErrorMessage(ex));
     m_reason = EXCEPTION;
-    NFD_LOG_ERROR("g_io.run() exception: " << ex.what());
-    m_lastException = ex;
+    m_lastException = std::current_exception();
   }
 
   getGlobalIoService().reset();
   scheduler::cancel(m_timeout);
   m_isRunning = false;
+
   return m_reason;
 }
 
@@ -97,6 +93,7 @@
   }
 
   --m_nOpsRemaining;
+
   if (m_nOpsRemaining <= 0) {
     m_reason = EXCEED_OPS;
     getGlobalIoService().stop();
@@ -116,11 +113,5 @@
   }
 }
 
-const std::exception&
-LimitedIo::getLastException() const
-{
-  return m_lastException;
-}
-
 } // namespace tests
 } // namespace nfd
diff --git a/tests/limited-io.hpp b/tests/limited-io.hpp
index 437335c..4891b8a 100644
--- a/tests/limited-io.hpp
+++ b/tests/limited-io.hpp
@@ -27,9 +27,10 @@
 #define NFD_TESTS_LIMITED_IO_HPP
 
 #include "test-common.hpp"
-#include "core/global-io.hpp"
 #include "core/scheduler.hpp"
 
+#include <exception>
+
 namespace nfd {
 namespace tests {
 
@@ -38,15 +39,13 @@
 class LimitedIo : noncopyable
 {
 public:
-  LimitedIo();
-
   /** \brief construct with UnitTestTimeFixture
    */
-  LimitedIo(UnitTestTimeFixture* uttf);
+  explicit
+  LimitedIo(UnitTestTimeFixture* uttf = nullptr);
 
   /// indicates why .run returns
-  enum StopReason
-  {
+  enum StopReason {
     /// g_io.run() returns normally because there's no work to do
     NO_WORK,
     /// .afterOp() has been invoked nOpsLimit times
@@ -71,9 +70,6 @@
   void
   afterOp();
 
-  const std::exception&
-  getLastException() const;
-
   /** \brief defer for specified duration
    *
    *  equivalent to .run(UNLIMITED_OPS, d)
@@ -84,6 +80,12 @@
     this->run(UNLIMITED_OPS, d);
   }
 
+  std::exception_ptr
+  getLastException() const
+  {
+    return m_lastException;
+  }
+
 private:
   /** \brief an exception to stop IO operation
    */
@@ -100,11 +102,11 @@
 
 private:
   UnitTestTimeFixture* m_uttf;
-  bool m_isRunning;
+  StopReason m_reason;
   int m_nOpsRemaining;
   scheduler::EventId m_timeout;
-  StopReason m_reason;
-  std::exception m_lastException;
+  std::exception_ptr m_lastException;
+  bool m_isRunning;
 };
 
 } // namespace tests
