log the exception stack if available