Handling various error conditions.