mirror of https://github.com/apache/openjpa.git
Merge from ../branches/1.1.x. svn merge -c 657148 ../branches/1.1.x
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@666920 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
12c0a094ee
commit
06ab9692d5
|
@ -171,6 +171,8 @@ public class Exceptions {
|
|||
if (i < nested.length) {
|
||||
out.println("NestedThrowables:");
|
||||
for (; i < nested.length; i++)
|
||||
// guard against a nasty null in the array
|
||||
if (nested[i] != null)
|
||||
nested[i].printStackTrace(out);
|
||||
}
|
||||
}
|
||||
|
@ -188,6 +190,8 @@ public class Exceptions {
|
|||
if (i < nested.length) {
|
||||
out.println("NestedThrowables:");
|
||||
for (; i < nested.length; i++)
|
||||
// guard against a nasty null in the array
|
||||
if (nested[i] != null)
|
||||
nested[i].printStackTrace(out);
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +243,10 @@ public class Exceptions {
|
|||
if (isSerializable(nested[i]))
|
||||
newNested[i] = nested[i];
|
||||
else
|
||||
newNested[i] = new Exception(nested[i].toString());
|
||||
// guard against a nasty null in the array by using valueOf
|
||||
// instead of toString to prevent throwing yet another
|
||||
// exception
|
||||
newNested[i] = new Exception(String.valueOf(nested[i]));
|
||||
}
|
||||
return newNested;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue