当前位置: 首页>>代码示例>>Java>>正文


Java InvocationException类代码示例

本文整理汇总了Java中com.google.gwt.user.client.rpc.InvocationException的典型用法代码示例。如果您正苦于以下问题:Java InvocationException类的具体用法?Java InvocationException怎么用?Java InvocationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InvocationException类属于com.google.gwt.user.client.rpc包,在下文中一共展示了InvocationException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reportError

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
public void reportError(String context, Throwable t) {
  String textMessage;
  if (t instanceof org.opendatakit.common.persistence.client.exception.DatastoreFailureException) {
    textMessage = context + t.getMessage();
  } else if (t instanceof org.opendatakit.common.security.client.exception.AccessDeniedException) {
    textMessage = "You do not have permission for this action.\n" + context + t.getMessage();
  } else if (t instanceof InvocationException) {
    // could occur if the cached JavaScript is out-of-sync with server
    UrlHash.redirect();
    return;
  } else if ( t.getMessage().contains("uuid:081e8b57-1698-4bbf-ba5b-ae31338b121d") ) {
    // magic number for the service-error.html page.
    // Generally means an out-of-quota error.
    UrlHash.redirect();
    return;
  } else {
    textMessage = context + t.getMessage();
  }
  errorMsgLabel.setText(textMessage);
  displayErrorPanel();
  resize();
  Window.alert(textMessage);
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:24,代码来源:AggregateUI.java

示例2: listPuzzles

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
@Override
public Request listPuzzles(final AsyncCallback<PuzzleDescriptor[]> callback) {
    return super.listPuzzles( new AsyncCallback<PuzzleDescriptor[]>(){

        @Override
        public void onFailure(Throwable caught) {
            if(caught instanceof InvocationException){
                RetryLocalStorageServiceProxy.super.listPuzzles(callback);
            } else {
                callback.onFailure(caught);
            }
        }

        @Override
        public void onSuccess(PuzzleDescriptor[] result) {
            callback.onSuccess(result);
        }

    });
}
 
开发者ID:kebernet,项目名称:shortyz,代码行数:21,代码来源:RetryLocalStorageServiceProxy.java

示例3: findPuzzle

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
@Override
public Request findPuzzle(final Long puzzleId, final AsyncCallback<Puzzle> callback) {
    return super.findPuzzle(puzzleId, new AsyncCallback<Puzzle>(){

        @Override
        public void onFailure(Throwable caught) {
            if(caught instanceof InvocationException ){
                RetryLocalStorageServiceProxy.super.findPuzzle(puzzleId, callback);
            } else {
                callback.onFailure(caught);
            }
        }

        @Override
        public void onSuccess(Puzzle result) {
            callback.onSuccess(result);
        }

    });
}
 
开发者ID:kebernet,项目名称:shortyz,代码行数:21,代码来源:RetryLocalStorageServiceProxy.java

示例4: getMessage

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
public static String getMessage(Throwable caught, String message) {
	String messageBody = "";
	try {
		throw caught;
	} catch (IncompatibleRemoteServiceException incompatibleException) {
		messageBody = "This application is out of date, please click the refresh button on your browser.";
	} catch (InvocationException  invocationException) {
		
		messageBody =  "The network connection to the server is temporarily unavailable.Please retry or refresh the browser. If the problem still exists please contact your support team.";						
	} catch (GWTApplicationStoreException  gwtApplicationStoreException) {
		
		messageBody =  "Please refresh the browser. If the problem still exists please contact your support team.";						
	} 
	catch (Throwable te) {
		messageBody = message;		
    } 
	return messageBody;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:19,代码来源:ExceptionUtil.java

示例5: onFailure

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
public void onFailure(Throwable caught) {

        if (caught instanceof InvocationException) {
            InvocationException ie = (InvocationException) caught;
            if(ie.getMessage().contains("j_spring_security_check"))
            {
//                Window.alert("Session is timed out. Please login again");
                Window.open(GWT.getHostPageBaseURL() + "login.html", "_self", null);
                return;
            }
        } 
        
      //Do other error handling here
        doFailureAction();
    }
 
开发者ID:dpinney,项目名称:essence,代码行数:16,代码来源:AsyncCallbackAdapter.java

示例6: onFailure

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
@Override
public void onFailure(Throwable exception) {
	if(exception instanceof InvocationException) {
		ConfirmationDialogUtil.showConfirmationDialogError(LocaleDictionary.get().getConstantValue(
				LocaleCommonConstants.SERVER_DISCONNECTED), true);
	} else {
		customFailure(exception);
	}
	
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:11,代码来源:EphesoftAsyncCallback.java

示例7: handleFailure

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
protected void handleFailure(Throwable caught) {
    if (caught instanceof InvocationException || caught instanceof IncompatibleRemoteServiceException) {
        if (caught instanceof StatusCodeException) {
            handleStatusCodeException(caught);
        } else {
            handleUncheckedException(caught);
        }
    } else if (caught instanceof CheckedException) {
        handleCheckedException((CheckedException) caught);
    } else {
        handleUnknownException(caught);
    }
}
 
开发者ID:halls,项目名称:wannatrak,代码行数:14,代码来源:ServerRequest.java

示例8: failed

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
public void failed(Throwable caught) {
  setStatusText("Error");
  if (errorDialog == null) {
    errorDialog = new ErrorDialog();
  }
  if (caught instanceof InvocationException) {
    errorDialog.setText("An RPC server could not be reached");
    errorDialog.setBody(NO_CONNECTION_MESSAGE);
  } else {
    errorDialog.setText("Unexcepted Error processing remote call");
    errorDialog.setBody(caught.getMessage());
  }
  errorDialog.center();
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:15,代码来源:DynaTableWidget.java

示例9: isInvalidXSRF

import com.google.gwt.user.client.rpc.InvocationException; //导入依赖的package包/类
protected static boolean isInvalidXSRF(Throwable caught) {
  return caught instanceof InvocationException
      && caught.getMessage().equals(JsonConstants.ERROR_INVALID_XSRF);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:5,代码来源:GerritCallback.java


注:本文中的com.google.gwt.user.client.rpc.InvocationException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。