1 package ch
.cyberduck
.connection
;
4 * ch.cyberduck.connection.SessionException.java
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
29 * An exception occuring when communicating with a remote host but not IO related.
32 public class SessionException
extends Exception
{
34 private int code
= -1;
37 * @param message The description of the exception
39 public SessionException(String message
) {
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
) {
49 this.code
= replycode
;
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
) {
59 this.code
= Integer
.parseInt(replycode
);
61 catch (NumberFormatException ex
) {
66 * @return The code the server replied along with the error message
68 public int getReplyCode() {