RemoteOperationFailedException.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Nextcloud - Android Client
  3. *
  4. * SPDX-FileCopyrightText: 2017-2019 Andy Scherzinger <info@andy-scherzinger.de>
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. package com.owncloud.android.operations;
  8. /**
  9. * RuntimeException for throwing errors of remote operation calls.
  10. */
  11. public class RemoteOperationFailedException extends RuntimeException {
  12. private static final long serialVersionUID = 5429778514835938713L;
  13. /**
  14. * Constructs a new runtime exception with the specified detail message and
  15. * cause.
  16. *
  17. * @param message the detail message (which is saved for later retrieval
  18. * by the {@link #getMessage()} method).
  19. * @param cause the cause (which is saved for later retrieval by the
  20. * {@link #getCause()} method). (A <code>null</code> value
  21. * is permitted, and indicates that the cause is nonexistent
  22. * or unknown.)
  23. */
  24. public RemoteOperationFailedException(String message, Throwable cause) {
  25. super(message + " / " + cause.getMessage(), cause);
  26. }
  27. /**
  28. * Constructs a new runtime exception with the specified detail message and
  29. * cause.
  30. *
  31. * @param message the detail message (which is saved for later retrieval
  32. * by the {@link #getMessage()} method).
  33. */
  34. public RemoteOperationFailedException(String message) {
  35. super(message);
  36. }
  37. }