added printErrorMessage(e) to view