style: change invalid state exception msg
This commit is contained in:
@@ -114,7 +114,7 @@ class Dumper
|
|||||||
public void DumpCharacters()
|
public void DumpCharacters()
|
||||||
{
|
{
|
||||||
if (_dataPak == null || _provider == null)
|
if (_dataPak == null || _provider == null)
|
||||||
throw new InvalidOperationException("Attempted to call dump function without dumper initialization");
|
throw new InvalidOperationException("Attempted to call dump function without dumper initialization/state");
|
||||||
|
|
||||||
_log.Info("Dumping characters");
|
_log.Info("Dumping characters");
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ class Dumper
|
|||||||
public void DumpCharacterIcons()
|
public void DumpCharacterIcons()
|
||||||
{
|
{
|
||||||
if (_provider == null)
|
if (_provider == null)
|
||||||
throw new InvalidOperationException("Attempted to call dump function without dumper initialization");
|
throw new InvalidOperationException("Attempted to call dump function without dumper initialization/state");
|
||||||
|
|
||||||
_log.Info("Dumping character icons");
|
_log.Info("Dumping character icons");
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ class Dumper
|
|||||||
public void DumpItems()
|
public void DumpItems()
|
||||||
{
|
{
|
||||||
if (_dataPak == null || _provider == null)
|
if (_dataPak == null || _provider == null)
|
||||||
throw new InvalidOperationException("Attempted to call dump function without dumper initialization");
|
throw new InvalidOperationException("Attempted to call dump function without dumper initialization/state");
|
||||||
|
|
||||||
_log.Info("Dumping character icons");
|
_log.Info("Dumping character icons");
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ class Dumper
|
|||||||
public void DumpItemIcons()
|
public void DumpItemIcons()
|
||||||
{
|
{
|
||||||
if (_provider == null)
|
if (_provider == null)
|
||||||
throw new InvalidOperationException("Attempted to call dump function without dumper initialization");
|
throw new InvalidOperationException("Attempted to call dump function without dumper initialization/state");
|
||||||
|
|
||||||
_log.Info("Dumping item icons");
|
_log.Info("Dumping item icons");
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ class Dumper
|
|||||||
|
|
||||||
private void ExportIcon(string assetPath, string outPath)
|
private void ExportIcon(string assetPath, string outPath)
|
||||||
{
|
{
|
||||||
if (_provider == null) throw new InvalidOperationException("Attempted to export icon when dumper was not initialized/invalid");
|
if (_provider == null) throw new InvalidOperationException("Attempted to call dump function without dumper initialization/state");
|
||||||
|
|
||||||
string cleanPath = assetPath.Contains('.') ? assetPath[..assetPath.LastIndexOf('.')] : assetPath;
|
string cleanPath = assetPath.Contains('.') ? assetPath[..assetPath.LastIndexOf('.')] : assetPath;
|
||||||
string fileName = Path.GetFileName(cleanPath) + ".png";
|
string fileName = Path.GetFileName(cleanPath) + ".png";
|
||||||
|
|||||||
Reference in New Issue
Block a user