optional cb on exception