Skip to content

Commit

Permalink
removed throw statement from destructors, would propose a log message…
Browse files Browse the repository at this point in the history
… instead.

(exceptions in destructors can cause stack unwinding to terminate)

Signed-off-by: Kai Ritterbusch <[email protected]>
  • Loading branch information
kairibu authored and qdot committed Dec 12, 2010
1 parent 4fab6af commit 90492da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/libfreenect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace Freenect {
freenect_set_video_callback(m_dev, freenect_video_callback);
}
~FreenectDevice() {
if(freenect_close_device(m_dev) < 0) throw std::runtime_error("Cannot shutdown Kinect");
if(freenect_close_device(m_dev) < 0){} //FN_WARNING("Device did not shutdown in a clean fashion");
}
void startVideo() {
if(freenect_start_video(m_dev) < 0) throw std::runtime_error("Cannot start RGB callback");
Expand Down Expand Up @@ -124,7 +124,7 @@ namespace Freenect {
}
m_stop = true;
pthread_join(m_thread, NULL);
if(freenect_shutdown(m_ctx) < 0) throw std::runtime_error("Cannot cleanup freenect library");
if(freenect_shutdown(m_ctx) < 0){} //FN_WARNING("Freenect did not shutdown in a clean fashion");
}
T& createDevice(int _index) {
m_devices.insert(std::make_pair<int, T*>(_index, new T(m_ctx, _index)));
Expand Down

0 comments on commit 90492da

Please sign in to comment.