exception: Add exceptions when context creation fails
* Exceptions only fired in constructor when it would initialise with a NULL context causing segfaults if used any further * Adds exception.i requirement to mraa.i for node.js and python support Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -25,5 +25,9 @@
|
||||
import mraa
|
||||
|
||||
print (mraa.getVersion())
|
||||
x = mraa.Aio(0)
|
||||
print (x.read())
|
||||
|
||||
try:
|
||||
x = mraa.Aio(0)
|
||||
print (x.read())
|
||||
except:
|
||||
print ("Are you sure you have an ADC?")
|
||||
|
||||
Reference in New Issue
Block a user