This is an automated email from the ASF dual-hosted git repository. afs pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/jena.git
commit 5a33dc9a0eb66c731bebe1d319be6944c073f2b7 Author: Andy Seaborne <[email protected]> AuthorDate: Tue Sep 1 16:46:44 2026 +0100 ErrorHandlerWrapper --- .../jena/riot/system/ErrorHandlerWrapper.java | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandlerWrapper.java b/jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandlerWrapper.java new file mode 100644 index 0000000000..a9b4feb9a1 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/riot/system/ErrorHandlerWrapper.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.apache.jena.riot.system; + +/** + * An error handler that direct method calls to another error handler. + * <p> + * This can be used add functional or monitoring to an existing error handler. + */ +public class ErrorHandlerWrapper implements ErrorHandler { + private final ErrorHandler other; + public ErrorHandler get() { + return other; + } + + public ErrorHandlerWrapper(ErrorHandler other) { + this.other = other; + } + + @Override + public void warning(String message, long line, long col) { + get().warning(message, line, col); + } + + @Override + public void error(String message, long line, long col) { + get().error(message, line, col); + } + + @Override + public void fatal(String message, long line, long col) { + get().fatal(message, line, col); + } +} \ No newline at end of file
