code: public void exception(Throwable exception) {
          if (this.exception == null) {
              this.exception = exception;
          } else {
              log.error("masked exception in command context. for root cause, see below as it will be rethrown later.",
                        exception);
              LogMDC.clear();
          }
      }
docs: Stores the provided exception on this {@link CommandContext} instance.
  That exception will be rethrown at the end of closing the {@link CommandContext} instance.
  <p>
  If there is already an exception being stored, a 'masked exception' message will be logged.