Adding necessary exception handling to text view.