Error-handling (WIP)

Change-Id: I91bd19c59c4dcd61a6655bad9b4ff7ea99fd384e
Signed-off-by: Matthias Steiner <matthias.steiner@inscope.net>