Commit errorlog and exit the application on error scenarios

This application interacts with OCC driver and hence its good to
terminate when there is an error during IO since it would mostly
mean a faulty hardware.

Fixes openbmc/openbmc#1428

Change-Id: I48bc7b2cf19922a7a53dbab78cdd4f2338a7431b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/org/open_power/OCC/PassThrough.errors.yaml b/org/open_power/OCC/PassThrough.errors.yaml
new file mode 100644
index 0000000..4be6325
--- /dev/null
+++ b/org/open_power/OCC/PassThrough.errors.yaml
@@ -0,0 +1,11 @@
+# org.open_power.OCC.PassThrough.OpenFailure
+- name: OpenFailure
+  description: Opening OCC device failed.
+
+# org.open_power.OCC.PassThrough.ReadFailure
+- name: ReadFailure
+  description: Reading from OCC failed.
+
+# org.open_power.OCC.PassThrough.WriteFailure
+- name: WriteFailure
+  description: Writing to OCC failed.