Commit daefe58e by Nathanael Nerode Committed by Tom Tromey

AccessException.java: Remerge from Classpath.

2002-06-16  Nathanael Nerode  <neroden@twcny.rr.com>

	* java/rmi/AccessException.java: Remerge from Classpath.
	* java/rmi/AlreadyBoundException.java: Ditto.
	* java/rmi/ConnectException.java: Ditto.
	* java/rmi/ConnectIOException.java: Ditto.
	* java/rmi/MarshalException.java: Ditto.
	* java/rmi/NoSuchObjectException.java: Ditto.
	* java/rmi/NotBoundException.java: Ditto.
	* java/rmi/RemoteException.java: Ditto.
	* java/rmi/RMISecurityException.java: Ditto.
	* java/rmi/ServerError.java: Ditto.
	* java/rmi/ServerException.java: Ditto.
	* java/rmi/ServerRuntimeException.java: Ditto.
	* java/rmi/StubNotFoundException.java: Ditto.
	* java/rmi/UnexpectedExcpetion.java: Ditto.
	* java/rmi/UnknownHostException.java: Ditto.
	* java/rmi/UnmarshalException.java: Ditto.

From-SVN: r54678
parent 65a90f3c
2002-06-16 Nathanael Nerode <neroden@twcny.rr.com>
* java/rmi/AccessException.java: Remerge from Classpath.
* java/rmi/AlreadyBoundException.java: Ditto.
* java/rmi/ConnectException.java: Ditto.
* java/rmi/ConnectIOException.java: Ditto.
* java/rmi/MarshalException.java: Ditto.
* java/rmi/NoSuchObjectException.java: Ditto.
* java/rmi/NotBoundException.java: Ditto.
* java/rmi/RemoteException.java: Ditto.
* java/rmi/RMISecurityException.java: Ditto.
* java/rmi/ServerError.java: Ditto.
* java/rmi/ServerException.java: Ditto.
* java/rmi/ServerRuntimeException.java: Ditto.
* java/rmi/StubNotFoundException.java: Ditto.
* java/rmi/UnexpectedExcpetion.java: Ditto.
* java/rmi/UnknownHostException.java: Ditto.
* java/rmi/UnmarshalException.java: Ditto.
2002-06-15 Tom Tromey <tromey@redhat.com> 2002-06-15 Tom Tromey <tromey@redhat.com>
* java/lang/AbstractMethodError.java: Re-merged with Classpath. * java/lang/AbstractMethodError.java: Re-merged with Classpath.
......
/* /* AccessException.java -- thrown if the caller does not have access
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,17 +37,40 @@ exception statement from your version. */ ...@@ -37,17 +37,40 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class AccessException /**
extends RemoteException { * Thrown to indicate that the caller does not have permission to access
* certain data, such as <code>bind</code> in an ActivationSystem.
public static final long serialVersionUID = 6314925228044966088l; *
* @author unknown
* @see Naming
* @see ActivationSystem
* @since 1.1
*/
public class AccessException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 6314925228044966088l;
public AccessException(String s) { /**
super(s); * Create an exception with a message.
} *
* @param s the message
public AccessException(String s, Exception e) { */
super (s, e); public AccessException(String s)
} {
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public AccessException(String s, Exception e)
{
super(s, e);
}
} }
/* /* AlreadyBoundException.java -- thrown if a binding is already bound
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,15 +37,37 @@ exception statement from your version. */ ...@@ -37,15 +37,37 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class AlreadyBoundException /**
extends Exception { * Thrown on an attempt to bind an object in the registry that is already
* bound.
public AlreadyBoundException() { *
super(); * @author unknown
} * @see Naming#bind(String, Remote)
* @see Registry#bind(String, Remote)
* @since 1.1
* @status updated to 1.4
*/
public class AlreadyBoundException extends Exception
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 9218657361741657110L;
public AlreadyBoundException(String s) { /**
super (s); * Create an exception with no message.
} */
public AlreadyBoundException()
{
}
/**
* Create an exception with a message.
*
* @param s the message
*/
public AlreadyBoundException(String s)
{
super(s);
}
} }
/* /* ConnectException.java -- thrown if a connection is refused
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,16 +37,38 @@ exception statement from your version. */ ...@@ -37,16 +37,38 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class ConnectException /**
extends RemoteException { * Thrown if a connection is refused for a remote call.
*
* @author unknown
* @since 1.1
* @status updated to 1.4
*/
public class ConnectException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 4863550261346652506L;
public ConnectException(String s) { /**
super(s); * Create an exception with a message.
} *
* @param s the message
public ConnectException(String s, Exception e) { */
super (s, e); public ConnectException(String s)
} {
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public ConnectException(String s, Exception e)
{
super(s, e);
}
} }
/* /* ConnectIOException.java -- thrown if an IO exception occurs during connect
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,16 +37,38 @@ exception statement from your version. */ ...@@ -37,16 +37,38 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class ConnectIOException /**
extends RemoteException { * Wraps an I/O Exception thrown while connecting for a remote call.
*
* @author unknown
* @since 1.1
* @status updated to 1.4
*/
public class ConnectIOException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = -8087809532704668744L;
public ConnectIOException(String s) { /**
super(s); * Create an exception with a message.
} *
* @param s the message
public ConnectIOException(String s, Exception e) { */
super (s, e); public ConnectIOException(String s)
} {
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public ConnectIOException(String s, Exception e)
{
super(s, e);
}
} }
/* /* MarshalException.java -- wraps error while marshalling parameters
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,16 +37,40 @@ exception statement from your version. */ ...@@ -37,16 +37,40 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class MarshalException /**
extends RemoteException { * Thrown if an exception occurs while marshalling data to send in a remote
* call. The call may not be retransmitted, if the "at most once" semantics
* are to be preserved.
*
* @author unknown
* @since 1.1
* @status updated to 1.4
*/
public class MarshalException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 6223554758134037936L;
public MarshalException(String s) { /**
super(s); * Create an exception with a message.
} *
* @param s the message
public MarshalException(String s, Exception e) { */
super (s, e); public MarshalException(String s)
} {
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public MarshalException(String s, Exception e)
{
super(s, e);
}
} }
/* /* NoSuchObjectException.java -- thrown if the remote object no longer exists
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,13 +37,32 @@ exception statement from your version. */ ...@@ -37,13 +37,32 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class NoSuchObjectException /**
extends RemoteException { * Thrown on an attempt to invoke a call on an object that no longer exists
* in the remote Virtual Machine. The call may be retransmitted and still
public static final long serialVersionUID = 6619395951570472985L; * obey the semantics of "at most once".
*
public NoSuchObjectException(String s) { * @author unknown
super(s); * @see RemoteObject#toStub(Remote)
} * @see UnicastRemoteObject#unexportObject(Remote, boolean)
* @see Activatable#unexportObject(Remote, boolean)
* @since 1.1
* @status updated to 1.4
*/
public class NoSuchObjectException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 6619395951570472985L;
/**
* Create an exception with a message.
*
* @param s the message
*/
public NoSuchObjectException(String s)
{
super(s);
}
} }
/* /* NotBoundException.java -- attempt to use a registry name with no binding
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,17 +37,39 @@ exception statement from your version. */ ...@@ -37,17 +37,39 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class NotBoundException /**
extends Exception { * Thrown on an attempt to lookup or unbind a registry name that has no
* associated binding.
public static final long serialVersionUID = -1857741824849069317l; *
* @author unknown
* @see Naming#lookup(String)
* @see Naming#unbind(String)
* @see Registry#lookup(String)
* @see Registry#unbind(String)
* @since 1.1
* @status updated to 1.4
*/
public class NotBoundException extends Exception
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = -1857741824849069317l;
public NotBoundException() { /**
super(); * Create an exception with no message.
} */
public NotBoundException()
public NotBoundException(String s) { {
super (s); }
}
/**
* Create an exception with a message.
*
* @param s the message
*/
public NotBoundException(String s)
{
super(s);
}
} }
/* /* RMISecurityException.java -- deprecated version of SecurityException
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,17 +37,41 @@ exception statement from your version. */ ...@@ -37,17 +37,41 @@ exception statement from your version. */
package java.rmi; package java.rmi;
import java.lang.SecurityException; /**
* Never thrown, but originally intended to wrap a java.lang.SecurityException.
public class RMISecurityException *
extends SecurityException { * @author unknown
* @since 1.1
* @deprecated use {@link SecurityException} instead
* @status updated to 1.4
*/
public class RMISecurityException extends SecurityException
{
/**
* Compatible with JDK 1.1.
*/
private static final long serialVersionUID = -8433406075740433514L;
public RMISecurityException(String n) { /**
super(n); * Create an exception with a message.
} *
* @param s the message
public RMISecurityException(String n, String a) { * @deprecated no longer needed
super(n); */
} public RMISecurityException(String n)
{
super(n);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
* @deprecated no longer needed
*/
public RMISecurityException(String n, String a)
{
super(n);
}
} }
/* /* RemoteException.java -- common superclass for exceptions in java.rmi
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,59 +37,91 @@ exception statement from your version. */ ...@@ -37,59 +37,91 @@ exception statement from your version. */
package java.rmi; package java.rmi;
import java.lang.Throwable;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
public class RemoteException
extends IOException {
public static final long serialVersionUID = -5148567311918794206l;
public Throwable detail;
public RemoteException() {
super();
detail = null;
}
public RemoteException(String s) {
super(s);
detail = null;
}
public RemoteException(String s, Throwable e) {
super(s);
detail = e;
}
public String getMessage() {
if (detail == null) {
return (super.getMessage());
}
else {
return (super.getMessage() + "; nested exception is: " + detail.getMessage());
}
}
public void printStackTrace(PrintStream s) {
if (detail != null) {
detail.printStackTrace(s);
}
super.printStackTrace(s);
}
public void printStackTrace(PrintWriter s) {
if (detail != null) {
detail.printStackTrace(s);
}
super.printStackTrace(s);
}
public void printStackTrace() {
printStackTrace(System.err);
}
/**
* The superclass of exceptions related to RMI (remote method invocation).
* Classes that implement <code>java.rmi.Remote</code> should list this
* exception in their throws clause.
*
* @author unknown
* @since 1.1
* @status updated to 1.4
*/
public class RemoteException extends IOException
{
/**
* Compatible with JDK 1.2+.
*/
private static final long serialVersionUID = -5148567311918794206l;
/**
* The cause of this exception. This pre-dates the exception chaining
* of Throwable; and although you can change this field, you are wiser
* to leave it alone.
*
* @serial the exception cause
*/
public Throwable detail;
/**
* Create an exception with no message, and cause initialized to null.
*/
public RemoteException()
{
this(null, null);
}
/**
* Create an exception with the given message, and cause initialized to null.
*
* @param s the message
*/
public RemoteException(String s)
{
this(s, null);
}
/**
* Create an exception with the given message and cause.
*
* @param s the message
* @param ex the cause
*/
public RemoteException(String s, Throwable e)
{
super(s);
initCause(e);
detail = e;
}
/**
* This method returns a message indicating what went wrong, in this
* format:
* <code>super.getMessage() + (detail == null ? ""
* : "; nested exception is:\n\t" + detail)<code>.
*
* @return the chained message
*/
public String getMessage()
{
if (detail == this || detail == null)
return super.getMessage();
return super.getMessage() + "; nested exception is:\n\t" + detail;
}
/**
* Returns the cause of this exception. Note that this may not be the
* original cause, thanks to the <code>detail</code> field being public
* and non-final (yuck). However, to avoid violating the contract of
* Throwable.getCause(), this returns null if <code>detail == this</code>,
* as no exception can be its own cause.
*
* @return the cause
* @since 1.4
*/
public Throwable getCause()
{
return detail == this ? null : detail;
}
} }
/* /* ServerError.java -- wraps an error while creating the server
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,11 +37,28 @@ exception statement from your version. */ ...@@ -37,11 +37,28 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class ServerError /**
extends RemoteException { * Wraps any error thrown while processing the server of a remote call.
*
public ServerError(String s, Error e) { * @author unknown
super(s, e); * @since 1.1
} * @status updated to 1.4
*/
public class ServerError extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 8455284893909696482L;
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public ServerError(String s, Error e)
{
super(s, e);
}
} }
/* /* ServerException.java -- wraps an exception while creating the server
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,17 +37,38 @@ exception statement from your version. */ ...@@ -37,17 +37,38 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class ServerException /**
extends RemoteException { * Wraps any exception thrown while processing the server of a remote call.
*
public static final long serialVersionUID = -4775845313121906682l; * @author unknown
* @since 1.1
* @status updated to 1.4
*/
public class ServerException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = -4775845313121906682l;
public ServerException(String s) { /**
super(s); * Create an exception with a message.
} *
* @param s the message
public ServerException(String s, Exception e) { */
super(s, e); public ServerException(String s)
} {
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public ServerException(String s, Exception e)
{
super(s, e);
}
} }
/* /* ServerRuntimeException.java -- wraps an exception while creating the server
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,11 +37,31 @@ exception statement from your version. */ ...@@ -37,11 +37,31 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class ServerRuntimeException /**
extends RemoteException { * Wraps any runtime exception thrown while processing the server of a
* remote call. Note, this exception is no longer used.
public ServerRuntimeException(String s, Exception e) { *
super(s, e); * @author unknown
} * @since 1.1
* @deprecated no replacement
* @status updated to 1.4
*/
public class ServerRuntimeException extends RemoteException
{
/**
* Compatible with JDK 1.1.
*/
private static final long serialVersionUID = 7054464920481467219L;
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
* @deprecated no longer needed
*/
public ServerRuntimeException(String s, Exception e)
{
super(s, e);
}
} }
/* /* StubNotFoundException.java -- thrown if a valid stub is not found
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,15 +37,41 @@ exception statement from your version. */ ...@@ -37,15 +37,41 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class StubNotFoundException /**
extends RemoteException { * Thrown if a valid stub class is not found for an object when it is exported.
*
* @author unknown
* @see UnicastRemoteObject
* @see Activatable
* @since 1.1
* @status updated to 1.4
*/
public class StubNotFoundException extends RemoteException
{
/**
* Compatible with JDK 1.2+.
*/
private static final long serialVersionUID = -7088199405468872373L;
public StubNotFoundException(String s) {
super(s);
}
public StubNotFoundException(String s, Exception e) { /**
super(s, e); * Create an exception with a message.
} *
* @param s the message
*/
public StubNotFoundException(String s)
{
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public StubNotFoundException(String s, Exception e)
{
super(s, e);
}
} }
/* /* UnexpectedException.java -- an unexpected checked exception was received
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,15 +37,39 @@ exception statement from your version. */ ...@@ -37,15 +37,39 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class UnexpectedException /**
extends RemoteException { * Thrown if an unexpected checked exception was received in a remote
* procedure call.
public UnexpectedException(String s) { *
super(s); * @author unknown
} * @since 1.1
* @status updated to 1.4
*/
public class UnexpectedException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 1800467484195073863L;
public UnexpectedException(String s, Exception e) { /**
super(s, e); * Create an exception with a message.
} *
* @param s the message
*/
public UnexpectedException(String s)
{
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public UnexpectedException(String s, Exception e)
{
super(s, e);
}
} }
/* /* UnknownHostException.java -- wraps java.net.UnknownHostException in RMI
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,15 +37,39 @@ exception statement from your version. */ ...@@ -37,15 +37,39 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class UnknownHostException /**
extends RemoteException { * Thrown if a java.net.UnknownHostException occurs during a remote
* procedure call.
public UnknownHostException(String s) { *
super(s); * @author unknown
} * @since 1.1
* @status updated to 1.4
*/
public class UnknownHostException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = -8152710247442114228L;
public UnknownHostException(String s, Exception e) { /**
super(s, e); * Create an exception with a message.
} *
* @param s the message
*/
public UnknownHostException(String s)
{
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public UnknownHostException(String s, Exception e)
{
super(s, e);
}
} }
/* /* UnmarshalException.java -- wraps error while unmarshalling parameters
Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -37,17 +37,52 @@ exception statement from your version. */ ...@@ -37,17 +37,52 @@ exception statement from your version. */
package java.rmi; package java.rmi;
public class UnmarshalException /**
extends RemoteException { * Thrown if an exception occurs while unmarshalling parameters or results
* of a remote method call. This includes:<br><ul>
public static final long serialVersionUID = 594380845140740218l; * <li>if an exception occurs while unmarshalling the call header</li>
* <li>if the protocol for the return value is invalid</li>
* <li>if a java.io.IOException occurs unmarshalling parameters (on the
* server side) or the return value (on the client side).</li>
* <li>if a java.lang.ClassNotFoundException occurs during unmarshalling
* parameters or return values</li>
* <li>if no skeleton can be loaded on the server-side; note that skeletons
* are required in the 1.1 stub protocol, but not in the 1.2 stub
* protocol.</li>
* <li>if the method hash is invalid (i.e., missing method).</li>
* <li>if there is a failure to create a remote reference object for a remote
* object's stub when it is unmarshalled.</li>
* </ul>
*
* @author unknown
* @since 1.1
* @status updated to 1.4
*/
public class UnmarshalException extends RemoteException
{
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 594380845140740218l;
public UnmarshalException(String s) { /**
super(s); * Create an exception with a message.
} *
* @param s the message
public UnmarshalException(String s, Exception e) { */
super(s, e); public UnmarshalException(String s)
} {
super(s);
}
/**
* Create an exception with a message and a cause.
*
* @param s the message
* @param e the cause
*/
public UnmarshalException(String s, Exception e)
{
super(s, e);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment