Added onExceptionCaught callback