-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Simplify syntax error message for scenario loader
- Loading branch information
1 parent
2e47334
commit 179d2a3
Showing
14 changed files
with
141 additions
and
31 deletions.
There are no files selected for viewing
15 changes: 12 additions & 3 deletions
15
...ain/java/org/kunlab/scenamatica/exceptions/scenariofile/InvalidScenarioFileException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
package org.kunlab.scenamatica.exceptions.scenariofile; | ||
|
||
import lombok.Getter; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
/** | ||
* 無効なシナリオファイルを読み込んだ場合にスローされる例外です。 | ||
*/ | ||
public class InvalidScenarioFileException extends Exception | ||
{ | ||
@Getter | ||
@Nullable | ||
private final String fileName; | ||
|
||
public InvalidScenarioFileException(String message, IllegalArgumentException e) | ||
public InvalidScenarioFileException(String message, String fileName, Throwable exception) | ||
{ | ||
super("Invalid scenario file syntax: " + message, e); | ||
super(message, exception); | ||
|
||
this.fileName = fileName; | ||
} | ||
|
||
public InvalidScenarioFileException(String message) | ||
public InvalidScenarioFileException(String message, String fileName) | ||
{ | ||
super(message); | ||
this.fileName = fileName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Scenamatica/ScenamaticaScenarioFile/src/main/resources/lang/en_US.lang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
scenario.file.parser.invalidScenarioFile=Plugin %%pluginName%% has an broken scenario file(%%fileName%%): %%message%% | ||
scenario.file.parser.versionMismatch=Scenario %%scenarioName%% requires a newer version of Scenamatica(%%currentScenamaticaVersion%%) than the one currently running Scenamatica(%%fileScenamaticaVersion%%). | ||
scenario.file.parser.notAScenarioFIle=File %%scenarioName%% is not a scenario file (missing 'scenamatica' key?). | ||
scenario.file.parser.invalidScenarioFileException=Invalid scenario file: %%message%% | ||
scenario.file.parser.invalidYamlSyntax=Scenario file %%scenarioName%% contains invalid YAML syntax: %%message%% | ||
scenario.file.manager.duplicated=Duplicated scenario files found: %%scenarioName%%(A: %%descriptionA%%, B: %%descriptionB%%) | ||
scenario.file.manager.pluginLoadingFailed=Failed to load scenarios of plugin %%pluginName%%. |
7 changes: 7 additions & 0 deletions
7
Scenamatica/ScenamaticaScenarioFile/src/main/resources/lang/ja_JP.lang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
scenario.file.parser.invalidScenarioFile=プラグイン %%pluginName%% は壊れているシナリオファイルを持っています(%%fileName%%):%%message%% | ||
scenario.file.parser.versionMismatch=シナリオ %%scenarioName%% には, 現在実行している Scenamatica(%%currentScenamaticaVersion%%)よりも新しいバージョンの Scenamatica(%%fileScenamaticaVersion%%) が必要です。 | ||
scenario.file.parser.invalidScenarioFileException=間違ったシナリオファイル:%%message%% | ||
scenario.file.parser.notAScenarioFIle=ファイル %%scenarioName%% はシナリオファイルではありません('scenamatica' キーが無い可能性があります)。 | ||
scenario.file.parser.invalidYamlSyntax=シナリオファイル %%scenarioName%% には無効なYAML構文が含まれています:%%message%% | ||
scenario.file.manager.duplicated=重複したシナリオファイルが見つかりました: %%scenarioName%%(A: %%descriptionA%%, B: %%descriptionB%%) | ||
scenario.file.manager.pluginLoadingFailed=プラグイン %%pluginName%% のシナリオの読み込みに失敗しました。 |
7 changes: 7 additions & 0 deletions
7
Scenamatica/ScenamaticaScenarioFile/src/main/resources/lang/ja_KS.lang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
scenario.file.parser.invalidScenarioFile=プラグイン %%pluginName%% はようわからんシナリオファイルを持ってるで(%%fileName%%):%%message%% | ||
scenario.file.parser.versionMismatch=シナリオ %%scenarioName%% には, 現在実行している Scenamatica(%%currentScenamaticaVersion%%)よりも新しいバージョンの Scenamatica(%%fileScenamaticaVersion%%) が必要やで。 | ||
scenario.file.parser.notAScenarioFIle=ファイル %%scenarioName%% はシナリオファイルじゃないっぽいで('scenamatica' キーが無いかもしれんで)。 | ||
scenario.file.parser.invalidScenarioFileException=ようわからんシナリオファイルやで:%%message%% | ||
scenario.file.parser.invalidYamlSyntax=シナリオファイル %%scenarioName%% には無効なYAML構文が含まれてるで:%%message%% | ||
scenario.file.manager.duplicated=重複したシナリオファイルが見つかったで: %%scenarioName%%(A: %%descriptionA%%, B: %%descriptionB%%) | ||
scenario.file.manager.pluginLoadingFailed=プラグイン %%pluginName%% のシナリオの読み込みに失敗したで。 |