LogDeviceProxy exception handler

Adds an exception handler so that applications can specify what to do in those cases (for example server runs out of disk space).

@samuelkadolph @arthurnn @sirupsen