Skip to content

Commit

Permalink
…NotFoundErrorKeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Oct 19, 2023
1 parent 04ac25a commit a9905cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,12 @@ class GetSupportedDevicesError(Exception):

...

class StyleNotFoundError(Exception):
class StyleNotFoundError(KeyError):
"""スタイルIDに対するスタイルが見つからなかった。"""

...

class ModelNotFoundError(Exception):
class ModelNotFoundError(KeyError):
"""音声モデルIDに対する音声モデルが見つからなかった。"""

...
Expand Down Expand Up @@ -501,7 +501,7 @@ class SaveUserDictError(Exception):

...

class WordNotFoundError(Exception):
class WordNotFoundError(KeyError):
"""ユーザー辞書に単語が見つからなかった。"""

...
Expand Down
8 changes: 4 additions & 4 deletions crates/voicevox_core_python_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use log::debug;
use once_cell::sync::Lazy;
use pyo3::{
create_exception,
exceptions::{PyException, PyValueError},
exceptions::{PyException, PyKeyError, PyValueError},
pyclass, pyfunction, pymethods, pymodule,
types::{IntoPyDict as _, PyBytes, PyDict, PyList, PyModule},
wrap_pyfunction, PyAny, PyObject, PyRef, PyResult, PyTypeInfo, Python, ToPyObject,
Expand Down Expand Up @@ -62,14 +62,14 @@ exceptions! {
StyleAlreadyLoadedError: PyException;
InvalidModelDataError: PyException;
GetSupportedDevicesError: PyException;
StyleNotFoundError: PyException;
ModelNotFoundError: PyException;
StyleNotFoundError: PyKeyError;
ModelNotFoundError: PyKeyError;
InferenceFailedError: PyException;
ExtractFullContextLabelError: PyException;
ParseKanaError: PyValueError;
LoadUserDictError: PyException;
SaveUserDictError: PyException;
WordNotFoundError: PyException;
WordNotFoundError: PyKeyError;
UseUserDictError: PyException;
InvalidWordError: PyValueError;
}
Expand Down

0 comments on commit a9905cc

Please sign in to comment.