From 64b491a61f600d250208b893a1630785e998d9a1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 6 Aug 2017 23:45:04 +0100 Subject: Add ice_print to device error --- p2pvr/ice/dvb.ice | 1 + p2pvr/ice/p2pvrHelpers.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 p2pvr/ice/p2pvrHelpers.cpp diff --git a/p2pvr/ice/dvb.ice b/p2pvr/ice/dvb.ice index 3c6ef87..44f2a56 100644 --- a/p2pvr/ice/dvb.ice +++ b/p2pvr/ice/dvb.ice @@ -4,6 +4,7 @@ #include "dvbsi.ice" module P2PVR { + ["cpp:ice_print"] exception DeviceError { string Device; string Message; diff --git a/p2pvr/ice/p2pvrHelpers.cpp b/p2pvr/ice/p2pvrHelpers.cpp new file mode 100644 index 0000000..7e04f87 --- /dev/null +++ b/p2pvr/ice/p2pvrHelpers.cpp @@ -0,0 +1,12 @@ +#include +#include + +namespace P2PVR { + AdHocFormatter(DeviceErrorMsg, "Device error: %? (%?) on %?"); + void + DeviceError::ice_print(std::ostream & s) const + { + DeviceErrorMsg::write(s, Message, Errno, Device); + } +} + -- cgit v1.2.3