home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 October / PCO1097.ISO / FilesBBS / WIN95 / IAVAZIP.EXE / DATA.Z / TreeViewException.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-08-18  |  774 b   |  29 lines

  1. package com.sfs.awt.treeview;
  2.  
  3. public class TreeViewException extends Exception {
  4.    static final int UNKNOWN_FOLDER = 0;
  5.    static final int UNKNOWN_ITEM = 1;
  6.    static final int NAME_ALREADY_EXISTS = 2;
  7.    static final int SEARCH_FAILED = 3;
  8.    int errorId;
  9.  
  10.    TreeViewException(int var1) {
  11.       this.errorId = var1;
  12.    }
  13.  
  14.    public String getMessage() {
  15.       switch (this.errorId) {
  16.          case 0:
  17.             return "The specified folder doesnt exist.";
  18.          case 1:
  19.             return "The specified item doesnt exist.";
  20.          case 2:
  21.             return "A folder or item with the specified name already exists";
  22.          case 3:
  23.             return "The given folderpath contains unknown folders.";
  24.          default:
  25.             return "An error occured in class TreeView.";
  26.       }
  27.    }
  28. }
  29.