catch the thrown exception