catch expections in pack/unpack