@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
if (reportLocation_ != null) { reportLocation_ = com.google.devtools.clouderrorreporting.v1beta1.SourceLocation.newBuilder( reportLocation_) .mergeFrom(value)
public static void executeNoCatch(String projectId) throws Exception { try (ReportErrorsServiceClient client = ReportErrorsServiceClient.create()) { ProjectName projectName = ProjectName.of(projectId); String message = "[MESSAGE]"; String service = "[SERVICE]"; ServiceContext serviceContext = ServiceContext.newBuilder().setService(service).build(); String filePath = "path/to/file.lang"; int lineNumber = 42; String functionName = "meaningOfLife"; SourceLocation reportLocation = SourceLocation.newBuilder() .setFilePath(filePath) .setLineNumber(lineNumber) .setFunctionName(functionName) .build(); ErrorContext context = ErrorContext.newBuilder().setReportLocation(reportLocation).build(); ReportedErrorEvent event = ReportedErrorEvent.newBuilder() .setMessage(message) .setServiceContext(serviceContext) .setContext(context) .build(); ReportErrorEventResponse response = client.reportErrorEvent(projectName, event); } }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
if (reportLocation_ != null) { reportLocation_ = com.google.devtools.clouderrorreporting.v1beta1.SourceLocation.newBuilder( reportLocation_) .mergeFrom(value)