security listener exception handling