Fix for:
CID 717163 (#1 of 1): Uncaught exception (UNCAUGHT_EXCEPT)
root_function: In function main(int, char **) an exception of type
ceph::buffer::end_of_buffer is thrown and never caught.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
#include "osd/OSDMap.h"
#include "include/buffer.h"
return 1;
}
OSDMap osdmap;
- osdmap.decode(bl);
+
+ try {
+ osdmap.decode(bl);
+ } catch (ceph::buffer::end_of_buffer &eob) {
+ cout << "Exception (end_of_buffer) in decode(), exit." << std::endl;
+ exit(1);
+ }
//osdmap.set_primary_affinity(0, 0x8000);
//osdmap.set_primary_affinity(3, 0);