diff --git a/Makefile.am b/Makefile.am
index 2e9a4f1..806a0aa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,5 +18,4 @@
                              ${PHOSPHOR_LOGGING_CFLAGS} \
                              ${SDBUSPLUS_CFLAGS} \
                              ${PHOSPHOR_DBUS_INTERFACES_CFLAGS}
-
 SUBDIRS = test
diff --git a/mainapp.cpp b/mainapp.cpp
index 7751aa9..43328c3 100644
--- a/mainapp.cpp
+++ b/mainapp.cpp
@@ -16,6 +16,9 @@
 
 #include <iostream>
 #include <phosphor-logging/log.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/elog-errors.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 #include "argument.hpp"
 #include "watchdog.hpp"
 
@@ -29,7 +32,8 @@
 int main(int argc, char** argv)
 {
     using namespace phosphor::logging;
-
+    using InternalFailure = sdbusplus::xyz::openbmc_project::Common::
+                                Error::InternalFailure;
     // Read arguments.
     auto options = phosphor::watchdog::ArgumentParser(argc, argv);
 
@@ -71,23 +75,32 @@
     // Attach the bus to sd_event to service user requests
     bus.attach_event(eventP.get(), SD_EVENT_PRIORITY_NORMAL);
 
-    // Create a watchdog object
-    phosphor::watchdog::Watchdog watchdog(bus, path.c_str(),
-                                          eventP, std::move(target));
-
-    // Claim the bus
-    bus.request_name(service.c_str());
-
-    // Wait until the timer has expired
-    while(!watchdog.timerExpired())
+    try
     {
-        // -1 denotes wait for ever
-        r = sd_event_run(eventP.get(), (uint64_t)-1);
-        if (r < 0)
+        // Create a watchdog object
+        phosphor::watchdog::Watchdog watchdog(bus, path.c_str(),
+                                              eventP, std::move(target));
+        // Claim the bus
+        bus.request_name(service.c_str());
+
+        // Wait until the timer has expired
+        while(!watchdog.timerExpired())
         {
-            log<level::ERR>("Error waiting for events");
-            return -1;
+            // -1 denotes wait for ever
+            r = sd_event_run(eventP.get(), (uint64_t)-1);
+            if (r < 0)
+            {
+                log<level::ERR>("Error waiting for events");
+                elog<InternalFailure>();
+            }
         }
     }
+    catch(InternalFailure& e)
+    {
+        phosphor::logging::commit<InternalFailure>();
+
+        // Need a coredump in the error cases.
+        std::terminate();
+    }
     return 0;
 }
diff --git a/test/Makefile.am b/test/Makefile.am
index 654f0f1..259e357 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -34,6 +34,7 @@
 timer_test_SOURCES = timer_test.cpp
 watchdog_test_SOURCES = watchdog_test.cpp
 
-timer_test_LDADD = $(top_builddir)/timer.o
-watchdog_test_LDADD = $(top_builddir)/timer.o \
-                      $(top_builddir)/watchdog.o
+timer_test_LDADD =  $(top_builddir)/timer.o
+
+watchdog_test_LDADD = $(top_builddir)/watchdog.o \
+                      $(top_builddir)/timer.o
diff --git a/timer.cpp b/timer.cpp
index c98dcb0..2825855 100644
--- a/timer.cpp
+++ b/timer.cpp
@@ -1,20 +1,28 @@
 #include <chrono>
 #include <systemd/sd-event.h>
 #include <phosphor-logging/log.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/elog-errors.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 #include "timer.hpp"
 namespace phosphor
 {
 namespace watchdog
 {
 
+// For throwing exception
+using namespace phosphor::logging;
+using InternalFailure = sdbusplus::xyz::openbmc_project::Common::
+                            Error::InternalFailure;
+
 // Initializes the timer object
 void Timer::initialize()
 {
     // This can not be called more than once.
     if (eventSource.get())
     {
-        // TODO: Need to throw elog exception stating its already added.
-        throw std::runtime_error("Timer already initialized");
+        log<level::ERR>("Timer already initialized");
+        elog<InternalFailure>();
     }
 
     // Add infinite expiration time
@@ -30,8 +38,8 @@
 
     if (r < 0)
     {
-        // TODO: throw elog exception
-        throw std::runtime_error("Timer initialization failed");
+        log<level::ERR>("Timer initialization failed");
+        elog<InternalFailure>();
     }
 
     // Disable the timer for now
@@ -68,6 +76,8 @@
 // Sets the expiration time and arms the timer
 void Timer::start(std::chrono::microseconds usec)
 {
+    using namespace std::chrono;
+
     // Get the current MONOTONIC time and add the delta
     auto expireTime = getCurrentTime() + usec;
 
@@ -76,8 +86,9 @@
                                       expireTime.count());
     if (r < 0)
     {
-        // TODO throw elog exception
-        throw std::runtime_error("Error setting the expiration time");
+        log<level::ERR>("Error setting the expiration time",
+                entry("MSEC=%llu",duration_cast<milliseconds>(usec).count()));
+        elog<InternalFailure>();
     }
 }
 
@@ -88,8 +99,8 @@
     auto r = sd_event_source_get_enabled(eventSource.get(), &enabled);
     if (r < 0)
     {
-        // TODO: Need to throw elog exception
-        throw std::runtime_error("Error geting current time enablement state");
+        log<level::ERR>("Error geting current timer type enablement state");
+        elog<InternalFailure>();
     }
     return enabled;
 }
@@ -100,8 +111,9 @@
     auto r = sd_event_source_set_enabled(eventSource.get(), type);
     if (r < 0)
     {
-        // TODO: Need to throw elog exception
-        throw std::runtime_error("Error altering enabled property");
+        log<level::ERR>("Error setting the timer type",
+                entry("TYPE=%d",type));
+        elog<InternalFailure>();
     }
 }
 
@@ -112,8 +124,8 @@
     auto r = sd_event_source_get_time(eventSource.get(), &next);
     if (r < 0)
     {
-        // TODO: Need to throw elog exception
-        throw std::runtime_error("Error altering enabled property");
+        log<level::ERR>("Error fetching remaining time to expire");
+        elog<InternalFailure>();
     }
     return std::chrono::microseconds(next);
 }
