- /*
- * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
- package javax.mail;
-
- import java.lang.*;
-
- /**
- * This exception is thrown by Folder methods, when those
- * methods are invoked on a non existent folder.
- *
- * @author John Mani
- */
-
- public class FolderNotFoundException extends MessagingException {
- transient private Folder folder;
-
- /**
- * Constructs a MessagingException with no detail message.
- */
- public FolderNotFoundException() {
- super();
- }
-
- /**
- * Constructs a MessagingException with the specified folder.
- * @param folder the Folder
- * @since JavaMail 1.2
- */
- public FolderNotFoundException(Folder folder) {
- super();
- this.folder = folder;
- }
-
- /**
- * Constructs a MessagingException with the specified folder and
- * the specified detail message.
- * @param folder the Folder
- * @param s the detail message
- * @since JavaMail 1.2
- */
- public FolderNotFoundException(Folder folder, String s) {
- super(s);
- this.folder = folder;
- }
-
- /**
- * Constructs a MessagingException with the specified detail message
- * and the specified folder.
- * @param s the detail message
- * @param folder the Folder
- */
- public FolderNotFoundException(String s, Folder folder) {
- super(s);
- this.folder = folder;
- }
-
- /**
- * Returns the offending Folder object.
- * @return the Folder object. Note that the returned value can be
- * <code>null</code>.
- */
- public Folder getFolder() {
- return folder;
- }
- }