Return-Path: Delivered-To: apmail-xml-xmlbeans-cvs-archive@www.apache.org Received: (qmail 13093 invoked from network); 19 Apr 2004 06:30:37 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Apr 2004 06:30:37 -0000 Received: (qmail 77766 invoked by uid 500); 19 Apr 2004 06:30:14 -0000 Delivered-To: apmail-xml-xmlbeans-cvs-archive@xml.apache.org Received: (qmail 77725 invoked by uid 500); 19 Apr 2004 06:30:14 -0000 Mailing-List: contact xmlbeans-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: xmlbeans-dev@xml.apache.org Delivered-To: mailing list xmlbeans-cvs@xml.apache.org Received: (qmail 77709 invoked from network); 19 Apr 2004 06:30:14 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 19 Apr 2004 06:30:14 -0000 Received: (qmail 13089 invoked by uid 1742); 19 Apr 2004 06:30:36 -0000 Date: 19 Apr 2004 06:30:36 -0000 Message-ID: <20040419063036.13088.qmail@minotaur.apache.org> From: zieg@apache.org To: xml-xmlbeans-cvs@apache.org Subject: cvs commit: xml-xmlbeans/v2/test/cases/marshal/com/mytest MyException.java YourClass.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N zieg 2004/04/18 23:30:36 Modified: v2/src/marshal/org/apache/xmlbeans/impl/marshal/util ReflectionUtils.java v2/test/cases/marshal doc.xml v2/test/cases/marshal/com/mytest YourClass.java Added: v2/test/cases/marshal/com/mytest MyException.java Log: better handling of user exceptions from bean methods Revision Changes Path 1.5 +2 -2 xml-xmlbeans/v2/src/marshal/org/apache/xmlbeans/impl/marshal/util/ReflectionUtils.java Index: ReflectionUtils.java =================================================================== RCS file: /home/cvs/xml-xmlbeans/v2/src/marshal/org/apache/xmlbeans/impl/marshal/util/ReflectionUtils.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ReflectionUtils.java 25 Mar 2004 03:19:28 -0000 1.4 +++ ReflectionUtils.java 19 Apr 2004 06:30:36 -0000 1.5 @@ -48,8 +48,8 @@ catch (IllegalArgumentException e) { throw new XmlException(e); } - catch (InvocationTargetException e) { - throw new XmlException(e); + catch (InvocationTargetException ite) { + throw new XmlException(ite.getTargetException()); } } 1.15 +1 -1 xml-xmlbeans/v2/test/cases/marshal/doc.xml Index: doc.xml =================================================================== RCS file: /home/cvs/xml-xmlbeans/v2/test/cases/marshal/doc.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- doc.xml 13 Mar 2004 03:46:57 -0000 1.14 +++ doc.xml 19 Apr 2004 06:30:36 -0000 1.15 @@ -4,7 +4,7 @@ xmlns:My="java:com.mytest" xmlns:n1="java:com.mytest"> - + 111111165.34 inner-str 1.19 +4 -0 xml-xmlbeans/v2/test/cases/marshal/com/mytest/YourClass.java Index: YourClass.java =================================================================== RCS file: /home/cvs/xml-xmlbeans/v2/test/cases/marshal/com/mytest/YourClass.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- YourClass.java 14 Apr 2004 23:03:51 -0000 1.18 +++ YourClass.java 19 Apr 2004 06:30:36 -0000 1.19 @@ -164,12 +164,16 @@ * @xsdgen:attribute.name Attrib */ public float getAttrib() + throws MyException { return attrib; } public void setAttrib(float attrib) + throws MyException { +// if (attrib < 0.001f) +// throw new MyException("too small: " + attrib); this.attrib = attrib; } 1.1 xml-xmlbeans/v2/test/cases/marshal/com/mytest/MyException.java Index: MyException.java =================================================================== /* Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.mytest; public class MyException extends Exception { public MyException() { } public MyException(String s) { super(s); } public MyException(String s, Throwable throwable) { super(s, throwable); } public MyException(Throwable throwable) { super(throwable); } } --------------------------------------------------------------------- To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org