From: Juergen H. <jho...@us...> - 2006-04-21 00:14:23
|
Update of /cvsroot/springframework/spring/src/org/springframework/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19629/src/org/springframework/core Modified Files: Tag: mbranch-1-2 NestedCheckedException.java NestedRuntimeException.java Log Message: backported fixes and enhancements from 2.0 M4 (HEAD) Index: NestedCheckedException.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/core/NestedCheckedException.java,v retrieving revision 1.15 retrieving revision 1.15.4.1 diff -C2 -d -r1.15 -r1.15.4.1 *** NestedCheckedException.java 9 Sep 2005 09:45:20 -0000 1.15 --- NestedCheckedException.java 21 Apr 2006 00:13:48 -0000 1.15.4.1 *************** *** 1,11 **** /* ! * Copyright 2002-2005 the original author or authors. ! * * 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, --- 1,11 ---- /* ! * Copyright 2002-2006 the original author or authors. ! * * 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, *************** *** 73,76 **** --- 73,77 ---- } + /** * Return the nested cause, or <code>null</code> if none. *************** *** 89,99 **** */ public String getMessage() { ! if (getCause() == null) { ! return super.getMessage(); ! } ! else { ! return super.getMessage() + "; nested exception is " + getCause().getClass().getName() + ! ": " + getCause().getMessage(); } } --- 90,99 ---- */ public String getMessage() { ! String message = super.getMessage(); ! Throwable cause = getCause(); ! if (cause != null) { ! return message + "; nested exception is " + cause; } + return message; } *************** *** 108,111 **** --- 108,112 ---- else { ps.println(this); + ps.print("Caused by: "); getCause().printStackTrace(ps); } *************** *** 122,125 **** --- 123,127 ---- else { pw.println(this); + pw.print("Caused by: "); getCause().printStackTrace(pw); } Index: NestedRuntimeException.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/core/NestedRuntimeException.java,v retrieving revision 1.15 retrieving revision 1.15.4.1 diff -C2 -d -r1.15 -r1.15.4.1 *** NestedRuntimeException.java 9 Sep 2005 09:45:20 -0000 1.15 --- NestedRuntimeException.java 21 Apr 2006 00:13:48 -0000 1.15.4.1 *************** *** 1,4 **** /* ! * Copyright 2002-2005 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 73,76 **** --- 73,77 ---- } + /** * Return the nested cause, or <code>null</code> if none. *************** *** 89,99 **** */ public String getMessage() { ! if (getCause() == null) { ! return super.getMessage(); ! } ! else { ! return super.getMessage() + "; nested exception is " + getCause().getClass().getName() + ! ": " + getCause().getMessage(); } } --- 90,99 ---- */ public String getMessage() { ! String message = super.getMessage(); ! Throwable cause = getCause(); ! if (cause != null) { ! return message + "; nested exception is " + cause; } + return message; } *************** *** 108,111 **** --- 108,112 ---- else { ps.println(this); + ps.print("Caused by: "); getCause().printStackTrace(ps); } *************** *** 122,125 **** --- 123,127 ---- else { pw.println(this); + pw.print("Caused by: "); getCause().printStackTrace(pw); } |