Check for read failures during sensor monitoring

Put in some minimal error handling for read failures on sysfs files used
for sensor monitoring.

This adds a common readFile function that will wrap opening and reading
a file.  It will throw an exception on a failure, which would happen if
the driver had a problem talking to the OCC.

It still just skips that sensor if there are any errors.  It still needs
to be figured out what to actually do in this case, but it will at least
detect an error during a read, which the previous code didn't do yet.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I06196470d5fd264ecb8bceda52701e3e6af048c1
1 file changed