diff --git a/src/ta12200/ta12200.cxx b/src/ta12200/ta12200.cxx index 136b3001..f9d3cb07 100644 --- a/src/ta12200/ta12200.cxx +++ b/src/ta12200/ta12200.cxx @@ -23,6 +23,8 @@ */ #include +#include +#include #include "ta12200.h" @@ -35,7 +37,8 @@ TA12200::TA12200(int pin) if ( !(m_aio = mraa_aio_init(pin)) ) { - cerr << __FUNCTION__ << ": mraa_aio_init() failed" << endl; + throw std::invalid_argument(std::string(__FUNCTION__) + + ": mraa_aio_init() failed, invalid pin?"); return; } }