public void BuildFailure(Exception ex) { if (ex == null) { throw new ArgumentNullException(nameof(ex)); } WriteMessage(ex.ToString()); }