added exception handling in department grape page