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


Java HttpStatusCodes.INTERNAL_SERVER_ERROR属性代码示例

本文整理汇总了Java中org.apache.olingo.odata2.api.commons.HttpStatusCodes.INTERNAL_SERVER_ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java HttpStatusCodes.INTERNAL_SERVER_ERROR属性的具体用法?Java HttpStatusCodes.INTERNAL_SERVER_ERROR怎么用?Java HttpStatusCodes.INTERNAL_SERVER_ERROR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.olingo.odata2.api.commons.HttpStatusCodes的用法示例。


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

示例1: handleError

@Override
public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException {
  if (context.getHttpStatus() == HttpStatusCodes.INTERNAL_SERVER_ERROR) {
    LOG.error("Internal Server Error", context.getException());
  }

  return EntityProvider.writeErrorDocument(context);
}
 
开发者ID:mirchiseth,项目名称:cf-cars-svc,代码行数:8,代码来源:AnnotationSampleServiceFactory.java

示例2: handleError

public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException {
  if (context.getHttpStatus() == HttpStatusCodes.INTERNAL_SERVER_ERROR) {
    LOG.error("Internal Server Error", context.getException());
  }

  return EntityProvider.writeErrorDocument(context);
}
 
开发者ID:mibo,项目名称:janos,代码行数:7,代码来源:SampleDsServiceFactory.java

示例3: handleError

@Override
public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException {
  if (context.getHttpStatus() == HttpStatusCodes.INTERNAL_SERVER_ERROR) {
    LOG.error("Internal Server Error", context.getException());
  }
  return EntityProvider.writeErrorDocument(context);
}
 
开发者ID:mibo,项目名称:janos,代码行数:7,代码来源:FitErrorCallback.java

示例4: testErrorCodeForApplicationException

@Test
public void testErrorCodeForApplicationException() throws Exception {
  // prepare
  String errorCode = "ErrorCode";
  String message = "expected exception message";
  Exception exception =
      new ODataApplicationException(message, Locale.ENGLISH, HttpStatusCodes.INTERNAL_SERVER_ERROR, errorCode);

  // execute
  Response response = exceptionMapper.toResponse(exception);

  // verify
  String errorMessage = verifyResponse(response, message, HttpStatusCodes.INTERNAL_SERVER_ERROR);
  assertXpathEvaluatesTo(errorCode, "/a:error/a:code", errorMessage);
}
 
开发者ID:apache,项目名称:olingo-odata2,代码行数:15,代码来源:ODataExceptionMapperImplTest.java

示例5: ODataInternalServerErrorException

public ODataInternalServerErrorException(final MessageReference messageReference) {
  super(messageReference, HttpStatusCodes.INTERNAL_SERVER_ERROR);
}
 
开发者ID:apache,项目名称:olingo-odata2,代码行数:3,代码来源:ODataInternalServerErrorException.java


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