sensors: clean up sensor if activate fails and catch all exceptions

Free sensor resources if the activate function fails.
Catch all exceptions (not only std::runtime_error) because the
upper layer doesn't expect them.

BUG=26084010

Tracked-On: https://jira01.devtools.intel.com/browse/BP-157
Change-Id: Ide399e32a85c858cb407010675d90c7997b0cc9d
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
3 files changed
tree: 087ef60fad1c93ff2a86dac5cd6b2e174a9c5a2f
  1. peripheral/
  2. soc/