01: /**
02: * $Id: NetFileException.java,v 1.10 2005/11/30 11:26:42 ss150821 Exp $
03: * Copyright 2002 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */
14:
15: /**
16: * The main exception class in NetFile
17: *
18: * This exception is used in different ways.
19: * This exception could be trapped and processed on servlet-side.
20: * This exception could also be trapped and sent to applet for display of user-friendly messages
21: *
22: * @author Suresh Yellamaraju
23: */package com.sun.portal.netfile.shared;
24:
25: import java.io.Serializable;
26: import com.sun.portal.log.common.PortalLogger;
27:
28: public class NetFileException extends Exception implements Serializable {
29:
30: public static final int NETFILE_NULLVALUE = 3;
31: public static final int NF_FATAL_ERROR = 6;
32: public static final int NETFILE_CREATEERROR = 8;
33:
34: //Exception codes used for Win hosts
35: public static final int NETFILE_CLASSNOTFOUND = 5;
36: public static final int NETFILE_WINERROR_CODE = 7;
37: public static final int NETFILE_SMBCLIENT_NOTFOUND = 4;
38: public static final int NETFILE_INVALID_DOMAIN = 2;
39: public static final int NETFILE_SERVER_NOTIN_DOMAIN = 9;
40: public static final int NETFILE_WIN_NOACCESS = 1;
41:
42: // Exception codes used when mailing files.
43: public static final int NETFILE_UNKNOWN_HOST_EXCEPTION = 11;
44: public static final int NETFILE_AUTHENTICATION_FAILED_EXCEPTION = 12;
45: public static final int NETFILE_UNSUPPORTED_ENCODING_EXCEPTION = 13;
46: public static final int NETFILE_SEND_FAILED_EXCEPTION = 14;
47: public static final int NETFILE_CONNECTION_FAILED_EXCEPTION = 15;
48:
49: public static final int NETFILE_GENERROR_CODE = 500;
50:
51: private int excepCode;
52: private String msg;
53:
54: public NetFileException() {
55: super ();
56: }
57:
58: public NetFileException(int arg, String comment) {
59: super (comment);
60: excepCode = arg;
61: msg = comment;
62: }
63:
64: public int getErrorCode() {
65: return excepCode;
66: }
67:
68: public void setErrorCode(int errorCode) {
69: excepCode = errorCode;
70: }
71:
72: }
|