From 0098be9e673aa37db065df5e595ff21de82ef267 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 21 Oct 2023 02:47:06 +0900 Subject: [PATCH] =?UTF-8?q?assert=E3=81=AF=E3=81=9B=E3=81=9A=E3=81=AB`Unsu?= =?UTF-8?q?pportedOperationException`=E3=82=92=E7=99=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../voicevoxcore/exceptions/ModelNotFoundException.java | 5 +++++ .../voicevoxcore/exceptions/StyleNotFoundException.java | 5 +++++ .../voicevoxcore/exceptions/WordNotFoundException.java | 5 +++++ crates/voicevox_core_java_api/src/common.rs | 3 --- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/ModelNotFoundException.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/ModelNotFoundException.java index 953a9345f..a2f750122 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/ModelNotFoundException.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/ModelNotFoundException.java @@ -5,4 +5,9 @@ public class ModelNotFoundException extends IndexOutOfBoundsException { public ModelNotFoundException(String message) { super(message); } + + public ModelNotFoundException(String message, Throwable cause) + throws UnsupportedOperationException { + throw new UnsupportedOperationException(); + } } diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/StyleNotFoundException.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/StyleNotFoundException.java index 826d88cda..f8467a019 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/StyleNotFoundException.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/StyleNotFoundException.java @@ -5,4 +5,9 @@ public class StyleNotFoundException extends IndexOutOfBoundsException { public StyleNotFoundException(String message) { super(message); } + + public StyleNotFoundException(String message, Throwable cause) + throws UnsupportedOperationException { + throw new UnsupportedOperationException(); + } } diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/WordNotFoundException.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/WordNotFoundException.java index 5db9de2d4..ef52f642f 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/WordNotFoundException.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/WordNotFoundException.java @@ -5,4 +5,9 @@ public class WordNotFoundException extends IndexOutOfBoundsException { public WordNotFoundException(String message) { super(message); } + + public WordNotFoundException(String message, Throwable cause) + throws UnsupportedOperationException { + throw new UnsupportedOperationException(); + } } diff --git a/crates/voicevox_core_java_api/src/common.rs b/crates/voicevox_core_java_api/src/common.rs index 001f39c0c..2da808aae 100644 --- a/crates/voicevox_core_java_api/src/common.rs +++ b/crates/voicevox_core_java_api/src/common.rs @@ -142,9 +142,6 @@ where InvalidWord, ); - // FIXME - assert!(!class.ends_with("NotFoundException") || error.source().is_none()); - let mut sources = iter::successors(error.source(), |&source| source.source()) .collect::>()