node: Catch DeviceError; use C++11 foreach shugar.