A little mixin used for handling errors