1. /*
  2. * @(#)BackingStoreException.java 1.5 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.util.prefs;
  8. import java.io.NotSerializableException;
  9. /**
  10. * Thrown to indicate that a preferences operation could not complete because
  11. * of a failure in the backing store, or a failure to contact the backing
  12. * store. <p>
  13. *
  14. * Note, that although BackingStoreException inherits Serializable interface
  15. * from Exception, it is not intended to be Serializable. Appropriate
  16. * serialization methods are implemented to throw NotSerializableException.
  17. *
  18. * @author Josh Bloch
  19. * @version 1.5, 01/23/03
  20. * @since 1.4
  21. * @serial exclude
  22. */
  23. public class BackingStoreException extends Exception {
  24. /**
  25. * Constructs a BackingStoreException with the specified detail message.
  26. *
  27. * @param s the detail message.
  28. */
  29. public BackingStoreException(String s) {
  30. super(s);
  31. }
  32. /**
  33. * Constructs a BackingStoreException with the specified cause.
  34. *
  35. * @param cause the cause
  36. */
  37. public BackingStoreException(Throwable cause) {
  38. super(cause);
  39. }
  40. /**
  41. * Throws NotSerializableException, since BackingStoreException objects
  42. * are not intended to be serializable.
  43. */
  44. private void writeObject(java.io.ObjectOutputStream out)
  45. throws NotSerializableException {
  46. throw new NotSerializableException("Not serializable.");
  47. }
  48. /**
  49. * Throws NotSerializableException, since BackingStoreException objects
  50. * are not intended to be serializable.
  51. */
  52. private void readObject(java.io.ObjectInputStream in)
  53. throws NotSerializableException {
  54. throw new NotSerializableException("Not serializable.");
  55. }
  56. }