thekid/rfc — Issue #86: RFC 0086: Exclude common trace elements from ChainedException's trace
Author: thekid
Created: 2011-10-09 14:58:17+00:00
State: closed
Labels: implemented, rfc

Scope of Change
====
Chained exceptions' stacktraces will be stripped of common elements.

Rationale
====
Stacktraces will become easier to read.

Functionality
====

Current behaviour
----

```
Exception remote.InvocationException ()
at php.sun.reflect.NativeMethodAccessorImpl::invoke0() [line -2 of NativeMethodAccessorImpl.java]
at php.sun.reflect.NativeMethodAccessorImpl::invoke() [line 39 of NativeMethodAccessorImpl.java]
at php.sun.reflect.DelegatingMethodAccessorImpl::invoke() [line 25 of DelegatingMethodAccessorImpl.java]
at php.java.lang.reflect.Method::invoke() [line 585 of Method.java]
at php.net.xp_framework.easc.server.CallDelegate::invoke() [line 25 of CallDelegate.java]
at php.net.xp_framework.easc.protocol.standard.ServerHandler::handle() [line 73 of ServerHandler.java]
at php.net.xp_framework.easc.server.HandlerThread::run() [line 50 of HandlerThread.java]
Caused by Exception remote.ExceptionReference (-1)
at php.java.util.Vector::elementAt() [line 435 of Vector.java]
at php.org.apache.lucene.search.Hits::hitDoc() [line 141 of Hits.java]
at php.org.apache.lucene.search.Hits::doc() [line 91 of Hits.java]
at php.de.schlund.lucene.HitsIterator::getAt() [line 78 of HitsIterator.java]
at php.sun.reflect.NativeMethodAccessorImpl::invoke0() [line -2 of NativeMethodAccessorImpl.java]
at php.sun.reflect.NativeMethodAccessorImpl::invoke() [line 39 of NativeMethodAccessorImpl.java]
at php.sun.reflect.DelegatingMethodAccessorImpl::invoke() [line 25 of DelegatingMethodAccessorImpl.java]
at php.java.lang.reflect.Method::invoke() [line 585 of Method.java]
at php.net.xp_framework.easc.server.CallDelegate::invoke() [line 25 of CallDelegate.java]
at php.net.xp_framework.easc.protocol.standard.ServerHandler::handle() [line 73 of ServerHandler.java]
at php.net.xp_framework.easc.server.HandlerThread::run() [line 50 of HandlerThread.java]

```

New behaviour
----

```
Exception remote.InvocationException ()
at php.sun.reflect.NativeMethodAccessorImpl::invoke0() [line -2 of NativeMethodAccessorImpl.java]
at php.sun.reflect.NativeMethodAccessorImpl::invoke() [line 39 of NativeMethodAccessorImpl.java]
at php.sun.reflect.DelegatingMethodAccessorImpl::invoke() [line 25 of DelegatingMethodAccessorImpl.java]
at php.java.lang.reflect.Method::invoke() [line 585 of Method.java]
at php.net.xp_framework.easc.server.CallDelegate::invoke() [line 25 of CallDelegate.java]
at php.net.xp_framework.easc.protocol.standard.ServerHandler::handle() [line 73 of ServerHandler.java]
at php.net.xp_framework.easc.server.HandlerThread::run() [line 50 of HandlerThread.java]
Caused by Exception remote.ExceptionReference (-1)
at php.java.util.Vector::elementAt() [line 435 of Vector.java]
at php.org.apache.lucene.search.Hits::hitDoc() [line 141 of Hits.java]
at php.org.apache.lucene.search.Hits::doc() [line 91 of Hits.java]
at php.de.schlund.lucene.HitsIterator::getAt() [line 78 of HitsIterator.java]
... 7 more

```

Note the "... 7 more"

Security considerations
====
n/a

Speed impact
====
Slightly slower for comparison check

Dependencies
====
- http://xp-framework.net/rfc/contrib/rfc0086.diff
Patch to lang.StackTraceElement

- xp-framework/rfc #85

Related documents
====
- http://xp-framework.net/rfc/contrib/exceptions.diff
Patch to all exception classes

Comments
====