C++ exceptions now propagate through python

This commit is contained in:
Ondrej Mikle 2014-07-19 15:54:57 +02:00
parent a8149abeec
commit 821f394602
3 changed files with 34 additions and 31 deletions

View file

@ -8,7 +8,7 @@
using namespace std;
NFCDevice::NFCDevice():
NFCDevice::NFCDevice() throw(NFCError):
pollNr(20),
pollPeriod(2),
_nfcContext(NULL),
@ -29,7 +29,7 @@ NFCDevice::~NFCDevice()
nfc_exit(_nfcContext);
}
void NFCDevice::open()
void NFCDevice::open() throw(NFCError)
{
if (opened()) {
return;
@ -60,7 +60,7 @@ void NFCDevice::close()
_opened = false;
}
std::string NFCDevice::scanUID()
std::string NFCDevice::scanUID() throw(NFCError)
{
int res;
nfc_target nt;