Skip to content

Commit

Permalink
raise valueerror in start > end
Browse files Browse the repository at this point in the history
  • Loading branch information
Yosshi999 committed Nov 17, 2024
1 parent 6d45309 commit 7c1d79c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/voicevox_core_python_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ mod blocking {

use camino::Utf8PathBuf;
use pyo3::{
exceptions::PyIndexError,
exceptions::{PyIndexError, PyValueError},
pyclass, pymethods,
types::{IntoPyDict as _, PyBytes, PyDict, PyList},
Py, PyAny, PyObject, PyRef, PyResult, Python,
Expand Down Expand Up @@ -719,7 +719,7 @@ mod blocking {
)));
}
if start > end {
return Err(PyIndexError::new_err(format!(
return Err(PyValueError::new_err(format!(
"({}, {}) is invalid range because start > end",
start, end,
)));
Expand Down

0 comments on commit 7c1d79c

Please sign in to comment.