mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Show errors from loading shared data table when decompiling
This commit is contained in:
@@ -46,7 +46,10 @@ public class DecompileCommand : CompilerCommandBase<DecompileCommand.Settings>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BeginErrorReporting(new IrisSourceRepository(enumeratedInputs));
|
var repoSources = enumeratedInputs.ToList();
|
||||||
|
if (settings.DataTable is not null)
|
||||||
|
repoSources.Add(settings.DataTable);
|
||||||
|
BeginErrorReporting(new IrisSourceRepository(repoSources));
|
||||||
|
|
||||||
var loadAssembliesResult = LoadAssemblies(settings);
|
var loadAssembliesResult = LoadAssemblies(settings);
|
||||||
if (loadAssembliesResult < 0)
|
if (loadAssembliesResult < 0)
|
||||||
@@ -68,7 +71,10 @@ public class DecompileCommand : CompilerCommandBase<DecompileCommand.Settings>
|
|||||||
{
|
{
|
||||||
dataTableLoadResult = LoadIrisFile(settings.DataTable, settings);
|
dataTableLoadResult = LoadIrisFile(settings.DataTable, settings);
|
||||||
if (dataTableLoadResult.Status != LoadResultStatus.Success)
|
if (dataTableLoadResult.Status != LoadResultStatus.Success)
|
||||||
throw new Exception($"Failed to load data table from {dataTableLoadResult.ErrorContextUri}");
|
{
|
||||||
|
AnsiConsole.MarkupLineInterpolated($"[red]Failed to load shared data table from {dataTableLoadResult.ErrorContextUri}[/]");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.Language == SourceLanguage.Asm)
|
if (settings.Language == SourceLanguage.Asm)
|
||||||
@@ -106,6 +112,12 @@ public class DecompileCommand : CompilerCommandBase<DecompileCommand.Settings>
|
|||||||
AnsiConsole.MarkupLine($"[red]{settings.Language} is not currently a supported decompilation target.[/]");
|
AnsiConsole.MarkupLine($"[red]{settings.Language} is not currently a supported decompilation target.[/]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
StopErrorReporting();
|
||||||
|
Report?.Render(AnsiConsole.Console);
|
||||||
|
AnsiConsole.WriteLine();
|
||||||
|
AnsiConsole.WriteLine();
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
AnsiConsole.MarkupLine("[red]Decompilation failed.[/]");
|
AnsiConsole.MarkupLine("[red]Decompilation failed.[/]");
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ internal class Program
|
|||||||
|
|
||||||
config.AddCommand<DecompileCommand>("decompile")
|
config.AddCommand<DecompileCommand>("decompile")
|
||||||
.WithAlias("d")
|
.WithAlias("d")
|
||||||
.WithDescription("Decompiles the given compiled UIX to a source langauge.");
|
.WithDescription("Decompiles the given compiled UIX to a source language.");
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
config.PropagateExceptions();
|
config.PropagateExceptions();
|
||||||
|
|||||||
Reference in New Issue
Block a user