You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-dev@xml.apache.org by dl...@apache.org on 2002/08/07 03:49:03 UTC
cvs commit: xml-rpc/src/java/org/apache/xmlrpc XmlRpc.java
dlr 2002/08/06 18:49:03
Modified: src/java/org/apache/xmlrpc XmlRpc.java
Log:
XmlWriter.writeObject(): Documented the exceptions thrown by this
method. Changed RuntimeException thrown by unsupported null vaules to
IllegalArgumentException (a RuntimeException sub-class).
Revision Changes Path
1.24 +7 -3 xml-rpc/src/java/org/apache/xmlrpc/XmlRpc.java
Index: XmlRpc.java
===================================================================
RCS file: /home/cvs/xml-rpc/src/java/org/apache/xmlrpc/XmlRpc.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -u -r1.23 -r1.24
--- XmlRpc.java 9 Jul 2002 18:29:24 -0000 1.23
+++ XmlRpc.java 7 Aug 2002 01:49:03 -0000 1.24
@@ -725,14 +725,18 @@
* Writes the XML representation of a supported Java object type.
*
* @param obj The <code>Object</code> to write.
+ * @exception IOException Problem writing data.
+ * @throws IllegalArgumentException If a <code>null</code>
+ * parameter is passed to this method (not supported by the <a
+ * href="http://xml-rpc.com/spec">XML-RPC specification</a>).
*/
public void writeObject(Object obj) throws IOException
{
startElement("value");
if (obj == null)
{
- throw new RuntimeException(
- "null value not supported by XML-RPC");
+ throw new IllegalArgumentException
+ ("null values not supported by XML-RPC");
}
else if (obj instanceof String)
{