Handle errors.

Signed-off-by: François de Metz <francois@stormz.me>