From 73e0a05b5fe77e917b8f8198adbf8fc50b00569a Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 19 Jan 2006 22:45:11 +0000 Subject: [PATCH] An internal error should always be accompanied by a log message. We could rely on the adpater user to sort that out, but it's easier to just log things here and save everyone time and effort. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3814 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/util/ConfirmAdapter.java | 4 +++- src/java/com/threerings/presents/util/ResultAdapter.java | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/util/ConfirmAdapter.java b/src/java/com/threerings/presents/util/ConfirmAdapter.java index 5f2dbb7b2..b7fc29d91 100644 --- a/src/java/com/threerings/presents/util/ConfirmAdapter.java +++ b/src/java/com/threerings/presents/util/ConfirmAdapter.java @@ -1,5 +1,5 @@ // -// $Id: ConfirmAdapter.java,v 1.2 2004/08/27 02:20:26 mdb Exp $ +// $Id$ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -23,6 +23,7 @@ package com.threerings.presents.util; import com.samskivert.util.ResultListener; +import com.threerings.presents.Log; import com.threerings.presents.client.InvocationService.ConfirmListener; import com.threerings.presents.data.InvocationCodes; import com.threerings.presents.server.InvocationException; @@ -56,6 +57,7 @@ public class ConfirmAdapter implements ResultListener if (cause instanceof InvocationException) { _listener.requestFailed(cause.getMessage()); } else { + Log.logStackTrace(cause); _listener.requestFailed(InvocationCodes.INTERNAL_ERROR); } } diff --git a/src/java/com/threerings/presents/util/ResultAdapter.java b/src/java/com/threerings/presents/util/ResultAdapter.java index d4fc2f084..d662f31c6 100644 --- a/src/java/com/threerings/presents/util/ResultAdapter.java +++ b/src/java/com/threerings/presents/util/ResultAdapter.java @@ -23,6 +23,7 @@ package com.threerings.presents.util; import com.samskivert.util.ResultListener; +import com.threerings.presents.Log; import com.threerings.presents.client.InvocationService; import com.threerings.presents.data.InvocationCodes; import com.threerings.presents.server.InvocationException; @@ -56,6 +57,7 @@ public class ResultAdapter implements ResultListener if (cause instanceof InvocationException) { _listener.requestFailed(cause.getMessage()); } else { + Log.logStackTrace(cause); _listener.requestFailed(InvocationCodes.INTERNAL_ERROR); } }