Error handling

Errors may be reported from BMI in one of two ways:

Both types of error codes for the time being consist of -errno values. This is not really expressive enough for long term use, but at least gives a general idea of the type of failure for now.