You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SearchForReuseTimeout.java 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2021, Fabio Ponciroli <ponch@gerritforge.com>
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.errors;
  11. import org.eclipse.jgit.internal.JGitText;
  12. import java.io.IOException;
  13. import java.text.MessageFormat;
  14. import java.time.Duration;
  15. /**
  16. * Thrown when the search for reuse phase times out.
  17. *
  18. * @since 5.13
  19. */
  20. public class SearchForReuseTimeout extends IOException {
  21. private static final long serialVersionUID = 1L;
  22. /**
  23. * Construct a search for reuse timeout error.
  24. *
  25. * @param timeout
  26. * time exceeded during the search for reuse phase.
  27. */
  28. public SearchForReuseTimeout(Duration timeout) {
  29. super(MessageFormat.format(JGitText.get().searchForReuseTimeout,
  30. Long.valueOf(timeout.getSeconds())));
  31. }
  32. @Override
  33. public synchronized Throwable fillInStackTrace() {
  34. return this;
  35. }
  36. }