ASF Bugzilla – Attachment 26770 Details for
Bug 50929
[patch] Ensure rethrown exceptions retain the original cause
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix problem in some files
ExceptionCause.patch (text/plain), 5.90 KB, created by
Sebb
on 2011-03-14 11:08:56 UTC
(
hide
)
Description:
Patch to fix problem in some files
Filename:
MIME Type:
Creator:
Sebb
Created:
2011-03-14 11:08:56 UTC
Size:
5.90 KB
patch
obsolete
>Index: java/javax/servlet/http/HttpUtils.java >=================================================================== >--- java/javax/servlet/http/HttpUtils.java (revision 1080234) >+++ java/javax/servlet/http/HttpUtils.java (working copy) >@@ -182,7 +182,7 @@ > } while ((len - offset) > 0); > > } catch (IOException e) { >- throw new IllegalArgumentException(e.getMessage()); >+ throw new IllegalArgumentException(e.getMessage(), e); > } > > // XXX we shouldn't assume that the only kind of POST body >@@ -194,7 +194,7 @@ > } catch (java.io.UnsupportedEncodingException e) { > // XXX function should accept an encoding parameter & throw this > // exception. Otherwise throw something expected. >- throw new IllegalArgumentException(e.getMessage()); >+ throw new IllegalArgumentException(e.getMessage(), e); > } > } > >Index: java/org/apache/catalina/connector/CoyoteInputStream.java >=================================================================== >--- java/org/apache/catalina/connector/CoyoteInputStream.java (revision 1080234) >+++ java/org/apache/catalina/connector/CoyoteInputStream.java (working copy) >@@ -101,7 +101,7 @@ > if (e instanceof IOException){ > throw (IOException)e; > } else { >- throw new RuntimeException(e.getMessage()); >+ throw new RuntimeException(e.getMessage(), e); > } > } > } else { >@@ -131,7 +131,7 @@ > if (e instanceof IOException){ > throw (IOException)e; > } else { >- throw new RuntimeException(e.getMessage()); >+ throw new RuntimeException(e.getMessage(), e); > } > } > } else { >@@ -162,7 +162,7 @@ > if (e instanceof IOException){ > throw (IOException)e; > } else { >- throw new RuntimeException(e.getMessage()); >+ throw new RuntimeException(e.getMessage() ,e); > } > } > } else { >@@ -195,7 +195,7 @@ > if (e instanceof IOException){ > throw (IOException)e; > } else { >- throw new RuntimeException(e.getMessage()); >+ throw new RuntimeException(e.getMessage(), e); > } > } > } else { >@@ -235,7 +235,7 @@ > if (e instanceof IOException){ > throw (IOException)e; > } else { >- throw new RuntimeException(e.getMessage()); >+ throw new RuntimeException(e.getMessage(), e); > } > } > } else { >Index: java/org/apache/catalina/realm/JDBCRealm.java >=================================================================== >--- java/org/apache/catalina/realm/JDBCRealm.java (revision 1080234) >+++ java/org/apache/catalina/realm/JDBCRealm.java (working copy) >@@ -698,7 +698,7 @@ > driver = (Driver) clazz.newInstance(); > } catch (Throwable e) { > ExceptionUtils.handleThrowable(e); >- throw new SQLException(e.getMessage()); >+ throw new SQLException(e.getMessage(), e); > } > } > >Index: java/org/apache/catalina/valves/JDBCAccessLogValve.java >=================================================================== >--- java/org/apache/catalina/valves/JDBCAccessLogValve.java (revision 1080234) >+++ java/org/apache/catalina/valves/JDBCAccessLogValve.java (working copy) >@@ -573,7 +573,7 @@ > driver = (Driver) clazz.newInstance(); > } catch (Throwable e) { > ExceptionUtils.handleThrowable(e); >- throw new SQLException(e.getMessage()); >+ throw new SQLException(e.getMessage(), e); > } > } > >Index: java/org/apache/naming/resources/WARDirContext.java >=================================================================== >--- java/org/apache/naming/resources/WARDirContext.java (revision 1080234) >+++ java/org/apache/naming/resources/WARDirContext.java (working copy) >@@ -990,7 +990,7 @@ > return is; > } > } catch (ZipException e) { >- throw new IOException(e.getMessage()); >+ throw new IOException(e.getMessage(), e); > } > return super.streamContent(); > } >Index: java/org/apache/tomcat/util/digester/NodeCreateRule.java >=================================================================== >--- java/org/apache/tomcat/util/digester/NodeCreateRule.java (revision 1080234) >+++ java/org/apache/tomcat/util/digester/NodeCreateRule.java (working copy) >@@ -172,7 +172,7 @@ > top.appendChild(doc.createTextNode(str)); > } > } catch (DOMException e) { >- throw new SAXException(e.getMessage()); >+ throw new SAXException(e.getMessage(), e); > } > > } >@@ -202,7 +202,7 @@ > top = top.getParentNode(); > depth--; > } catch (DOMException e) { >- throw new SAXException(e.getMessage()); >+ throw new SAXException(e.getMessage(), e); > } > > } >@@ -225,7 +225,7 @@ > try { > top.appendChild(doc.createProcessingInstruction(target, data)); > } catch (DOMException e) { >- throw new SAXException(e.getMessage()); >+ throw new SAXException(e.getMessage(), e); > } > > } >@@ -270,7 +270,7 @@ > previousTop.appendChild(top); > depth++; > } catch (DOMException e) { >- throw new SAXException(e.getMessage()); >+ throw new SAXException(e.getMessage(), e); > } > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 50929
: 26770