com.holonplatform.core.internal.Logger.error()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中com.holonplatform.core.internal.Logger.error()方法的一些代码示例,展示了Logger.error()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()方法的具体详情如下:
包路径:com.holonplatform.core.internal.Logger
类名称:Logger
方法名:error

Logger.error介绍

[英]Log a Level#ERROR type message.
[中]记录级别#错误类型消息。

代码示例

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin

@Override
public Result<PropertyBox> convertToModel(T value, ValueContext context) {
  try {
    return Result.ok(itemConverter.convert(value));
  } catch (Exception e) {
    LOGGER.error("Conversion to model failed", e);
    return Result.error(e.getMessage());
  }
}

代码示例来源:origin: com.holon-platform.jaxrs/holon-jaxrs-swagger-core

/**
 * Get the API response.
 * @param application JAX-RS Application reference
 * @param headers JAX-RS Headers reference
 * @param uriInfo JAX-RS URI info reference
 * @param outputType API definition output type
 * @return The API response
 */
protected Response getApi(Application application, HttpHeaders headers, UriInfo uriInfo, OutputType outputType) {
  // API context id
  final String contextId = getContextIdOrDefault();
  try {
    // get the API definition
    final ApiDefinition<M> api = getApi(contextId, application, headers, uriInfo);
    // check not null
    if (api.getApi() == null) {
      return Response.status(Status.NOT_FOUND)
          .entity("No API definition available for context id [" + contextId + "]").build();
    }
    // serialize the API definition
    return Response.status(Response.Status.OK).type(outputType.getMediaType())
        .entity(getApiOutput(outputType, api.getApi(), api.isPretty())).build();
  } catch (Exception e) {
    LOGGER.error("Failed to provide the API definition for context id [" + contextId + "]", e);
    return Response.status(Status.INTERNAL_SERVER_ERROR)
        .entity("Failed to provide the API definition for context id [" + contextId + "] - Error: ["
            + ExceptionUtils.getRootCauseMessage(e) + "]")
        .build();
  }
}

代码示例来源:origin: com.holon-platform.mongo/holon-datastore-mongo-async

LOGGER.error("Failed to finalize the transaction", e);
  return null;
}).thenApply(r -> {

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin-flow

windowSizeReceiver);
} catch (Exception e) {
  LOGGER.error("Failed to execute window size detection JS [" + e.getMessage() + "]");

相关文章

微信公众号

最新文章

更多