-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPartialDumpException.cs
More file actions
28 lines (25 loc) · 1.14 KB
/
Copy pathPartialDumpException.cs
File metadata and controls
28 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using S7Tools.Core.Models;
namespace S7Tools.Core.Exceptions;
/// <summary>
/// Exception thrown when a dump operation was interrupted (cancelled or failed)
/// but partial data was already written to disk and is available for recovery.
/// </summary>
public class PartialDumpException : MemoryDumpException
{
/// <summary>
/// Gets the partial <see cref="BootloaderResult"/> containing the paths of
/// any files that were fully or partially written before the interruption.
/// </summary>
public BootloaderResult PartialResult { get; }
/// <summary>
/// Initializes a new instance of the <see cref="PartialDumpException"/> class.
/// </summary>
/// <param name="message">The error message.</param>
/// <param name="innerException">The exception that caused the interruption.</param>
/// <param name="partialResult">The partial result with saved file paths.</param>
public PartialDumpException(string message, Exception innerException, BootloaderResult partialResult)
: base(message, innerException)
{
PartialResult = partialResult ?? throw new ArgumentNullException(nameof(partialResult));
}
}