mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(FileSystemStack): use ExceptionDispatchInfo to re-throw exception.
This commit is contained in:
parent
99b8faab23
commit
89674e9d58
@ -27,6 +27,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using GameRes.Strings;
|
using GameRes.Strings;
|
||||||
|
|
||||||
@ -558,7 +559,7 @@ namespace GameRes
|
|||||||
if (null == arc)
|
if (null == arc)
|
||||||
{
|
{
|
||||||
if (FormatCatalog.Instance.LastError is OperationCanceledException)
|
if (FormatCatalog.Instance.LastError is OperationCanceledException)
|
||||||
throw FormatCatalog.Instance.LastError;
|
ExceptionDispatchInfo.Capture (FormatCatalog.Instance.LastError).Throw();
|
||||||
else
|
else
|
||||||
throw new UnknownFormatException (FormatCatalog.Instance.LastError);
|
throw new UnknownFormatException (FormatCatalog.Instance.LastError);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user