*** empty log message ***
[cyberduck.git] / source / ch / cyberduck / Attic / connection / SessionException.java
blobfd7ec6a6cc7caa4bd5827b2336cb681e1df8c882
1 package ch.cyberduck.connection;
3 /*
4 * ch.cyberduck.connection.SessionException.java
5 * Cyberduck
7 * $Header$
8 * $Revision$
9 * $Date$
11 * Copyright (c) 2003 David Kocher. All rights reserved.
12 * http://icu.unizh.ch/~dkocher/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * Bug fixes, suggestions and comments should be sent to:
25 * dkocher@cyberduck.ch
28 /**
29 * An exception occuring when communicating with a remote host but not IO related.
30 * @version $Id$
32 public class SessionException extends Exception {
34 private int code = -1;
36 /**
37 * @param message The description of the exception
39 public SessionException(String message) {
40 super(message);
43 /**
44 * @param message The description of the exception
45 * @param reploycode The associated code the server replied with the error message
47 public SessionException(String message, int replycode) {
48 super(message);
49 this.code = replycode;
52 /**
53 * @param message The description of the exception
54 * @param reploycode The associated code the server replied with the error message
56 public SessionException(String message, String replycode) {
57 super(message);
58 try {
59 this.code = Integer.parseInt(replycode);
61 catch (NumberFormatException ex) {
65 /**
66 * @return The code the server replied along with the error message
68 public int getReplyCode() {
69 return this.code;