Skip to content

Commit

Permalink
capture error stack from porttag properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Modulus32 committed Apr 28, 2024
1 parent 88e0fd1 commit 4272db0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions TagTool/Commands/Porting/PortTagCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using TagTool.Geometry.BspCollisionGeometry;
using TagTool.Commands.ScenarioStructureBSPs;
using TagTool.Commands.Files;
using System.Runtime.ExceptionServices;

namespace TagTool.Commands.Porting
{
Expand Down Expand Up @@ -319,10 +320,8 @@ public CachedTag ConvertTag(Stream cacheStream, Stream blamCacheStream, Dictiona
}
catch (Exception e)
{
Console.WriteLine();
Console.WriteLine($"{e.GetType().Name} while porting '{blamTag.Name}.{blamTag.Group.Tag.ToString()}':");
Console.WriteLine();
throw e;
new TagToolError(CommandError.CustomError, $"{e.GetType().Name} while porting '{blamTag.Name}.{blamTag.Group.Tag.ToString()}':");
ExceptionDispatchInfo.Capture(e).Throw();
}
#endif
PortedTags[blamTag.Index] = result;
Expand Down

0 comments on commit 4272db0

Please sign in to comment.