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
This commit is contained in:
Michael Bayne
2006-01-19 22:45:11 +00:00
parent 96f017fc3e
commit 73e0a05b5f
2 changed files with 5 additions and 1 deletions
@@ -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);
}
}
@@ -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);
}
}