Handling errors

Errors are of two types: