This is an automated email from the ASF dual-hosted git repository. dominikriemer pushed a commit to branch migrate-storage-to-internal-couchdb-client in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 62f48e4cff7e923fd0dd8fb2dc7d6a8b28c3930f Author: Dominik Riemer <[email protected]> AuthorDate: Mon Nov 2 20:31:23 2026 +0100 Add exceptions --- .../api/exceptions/StorageConflictException.java | 33 ++++++++++++++++++++++ .../storage/api/exceptions/StorageException.java | 33 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/exceptions/StorageConflictException.java b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/exceptions/StorageConflictException.java new file mode 100644 index 0000000000..b859356ee6 --- /dev/null +++ b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/exceptions/StorageConflictException.java @@ -0,0 +1,33 @@ +/* + * 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 + * + * http://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. + * + */ + +package org.apache.streampipes.storage.api.exceptions; + +/** + * A write used an id that already exists or a revision that is no longer the current one. + */ +public class StorageConflictException extends StorageException { + + public StorageConflictException(String message) { + super(message); + } + + public StorageConflictException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/exceptions/StorageException.java b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/exceptions/StorageException.java new file mode 100644 index 0000000000..dcaebac477 --- /dev/null +++ b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/exceptions/StorageException.java @@ -0,0 +1,33 @@ +/* + * 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 + * + * http://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. + * + */ + +package org.apache.streampipes.storage.api.exceptions; + +/** + * Base class of the unchecked errors a storage implementation raises, independent of the database behind it. + */ +public class StorageException extends RuntimeException { + + public StorageException(String message) { + super(message); + } + + public StorageException(String message, Throwable cause) { + super(message, cause); + } +}
