Nuke Resulting.ReusableInvocationException.
Premature optimization the fun side effect of rendering the exception's attached stack trace completely useless. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6794 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -189,7 +189,7 @@ public class Resulting<T> extends Invoker.Unit
|
|||||||
// from InvocationService.InvocationListener
|
// from InvocationService.InvocationListener
|
||||||
public final void requestFailed (String error)
|
public final void requestFailed (String error)
|
||||||
{
|
{
|
||||||
requestFailed(INV_EX.get().setMessage(error));
|
requestFailed(new InvocationException(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
// from InvocationService.ConfirmListener
|
// from InvocationService.ConfirmListener
|
||||||
@@ -266,34 +266,6 @@ public class Resulting<T> extends Invoker.Unit
|
|||||||
|
|
||||||
protected Exception _error;
|
protected Exception _error;
|
||||||
|
|
||||||
protected static final ThreadLocal<ReusableInvocationException> INV_EX =
|
|
||||||
new ThreadLocal<ReusableInvocationException>() {
|
|
||||||
@Override protected ReusableInvocationException initialValue () {
|
|
||||||
return new ReusableInvocationException();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
protected static class ReusableInvocationException extends InvocationException
|
|
||||||
{
|
|
||||||
public ReusableInvocationException ()
|
|
||||||
{
|
|
||||||
super("");
|
|
||||||
}
|
|
||||||
|
|
||||||
public ReusableInvocationException setMessage (String msg)
|
|
||||||
{
|
|
||||||
_msg = msg;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public String getMessage ()
|
|
||||||
{
|
|
||||||
return _msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected String _msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static final ThreadLocal<StopException> STOP =
|
protected static final ThreadLocal<StopException> STOP =
|
||||||
new ThreadLocal<StopException>() {
|
new ThreadLocal<StopException>() {
|
||||||
@Override protected StopException initialValue () {
|
@Override protected StopException initialValue () {
|
||||||
|
|||||||
Reference in New Issue
Block a user