Add throw to transfunc