test trap exception