changed public api method to log_exception