Catching errors where they occur.