RFC - Squash warnings

This is an RFC - I'm not sure if introducing UnexpectedError is necessary, although I don't feel that any of the existing functions is appropriate when I used it. The main purpose of this commit is to silence numerous compiler warnings - many of which were useful in that the respective functions' return value was actually in need of handling.