KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > drftpd > commands > UnhandledCommandException


1 /*
2  * This file is part of DrFTPD, Distributed FTP Daemon.
3  *
4  * DrFTPD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * DrFTPD is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with DrFTPD; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package org.drftpd.commands;
19
20 import net.sf.drftpd.master.FtpRequest;
21
22 /**
23  * @author mog
24  * @version $Id: UnhandledCommandException.java,v 1.1 2004/06/01 15:40:34 mog Exp $
25  */

26 public class UnhandledCommandException extends Exception JavaDoc {
27     public UnhandledCommandException() {
28         super();
29     }
30
31     public static UnhandledCommandException create(Class JavaDoc clazz, FtpRequest req) {
32         return create(clazz, req.getCommand());
33     }
34     
35     public UnhandledCommandException(String JavaDoc message) {
36         super(message);
37     }
38
39     public UnhandledCommandException(String JavaDoc message, Throwable JavaDoc cause) {
40         super(message, cause);
41     }
42
43     public UnhandledCommandException(Throwable JavaDoc cause) {
44         super(cause);
45     }
46
47     public static UnhandledCommandException create(Class JavaDoc clazz, String JavaDoc command) {
48         return new UnhandledCommandException(clazz.getName()+" doesn't know how to handle "+command);
49     }
50 }
51
Popular Tags