-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out a ChildProcessErrorException class from ChildProcessException.
The former will be for non-zero exit codes, the latter for actual exceptions.
- Loading branch information
Showing
3 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace Vezel.Cathode.Processes; | ||
|
||
public class ChildProcessErrorException : ChildProcessException | ||
{ | ||
public int ExitCode { get; } | ||
|
||
public ChildProcessErrorException() | ||
: this("An unknown child process error occurred.") | ||
{ | ||
} | ||
|
||
public ChildProcessErrorException(string? message) | ||
: base(message) | ||
{ | ||
} | ||
|
||
public ChildProcessErrorException(string? message, int exitCode) | ||
: this(message) | ||
{ | ||
ExitCode = exitCode; | ||
} | ||
|
||
public ChildProcessErrorException(string? message, Exception? innerException) | ||
: base(message, innerException) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters