Custom errors

Signed-off-by: Tony G <mipt.shootnick.spam@gmail.com>