updated exception processor (added more type safe generics)