summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-01-24 16:45:28 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-02-15 20:29:06 +0000
commit73a3d96453c9f7539d0097ab5b7c5978be188eb0 (patch)
treef40dca3a95c975e8af976a89153e67ac01656312 /main.cpp
parent5fa487cc2aaef2c597f37a1acf050e20ea719e8d (diff)
downloadphosphor-net-ipmid-73a3d96453c9f7539d0097ab5b7c5978be188eb0.tar.gz
phosphor-net-ipmid-73a3d96453c9f7539d0097ab5b7c5978be188eb0.zip
Catch the exception when sending the IPMI response message
Change-Id: Ib233a797dc13499670c35e21497f8c13c9d74e04 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 89ef15c..d96d1cd 100644
--- a/main.cpp
+++ b/main.cpp
@@ -90,8 +90,16 @@ static int io_handler(sd_event_source* es, int fd, uint32_t revents,
return 0;
}
- // Send the response IPMI Message
- msgHandler.send(*(outMessage.get()));
+ try
+ {
+ // Send the response IPMI Message
+ msgHandler.send(*(outMessage.get()));
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Flattening & Sending the outgoing IPMI message failed\n";
+ std::cerr << e.what() << "\n";
+ }
return 0;
}
OpenPOWER on IntegriCloud