Skip to content

Commit

Permalink
エラー文変更
Browse files Browse the repository at this point in the history
  • Loading branch information
takana-v committed Feb 4, 2025
1 parent a9a4b19 commit c0616b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions voicevox_engine/user_dict/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class WordTypes(str, Enum):

def check_newlines_and_null(text: str) -> str:
if "\n" in text or "\r" in text:
raise ValueError("改行が含まれています。")
raise ValueError("ユーザー辞書データ内に改行が含まれています。")
if "\x00" in text:
raise ValueError("Null文字が含まれています。")
raise ValueError("ユーザー辞書データ内にNull文字が含まれています。")
return text


def check_comma_and_double_quote(text: str) -> str:
if "," in text:
raise ValueError("カンマが含まれています。")
raise ValueError("ユーザー辞書データ内にカンマが含まれています。")
if '"' in text:
raise ValueError("ダブルクォートが含まれています。")
raise ValueError("ユーザー辞書データ内にダブルクォートが含まれています。")
return text


Expand Down

0 comments on commit c0616b3

Please sign in to comment.