File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ namespace Flucli . Exceptions ;
4
+
5
+ /// <summary>
6
+ /// Represents an exception that is thrown when an invalid exit code is returned by a process.
7
+ /// </summary>
8
+ public class InvalidExitCodeException : Exception
9
+ {
10
+ /// <summary>
11
+ /// Initializes a new instance of <see cref="InvalidExitCodeException" />.
12
+ /// </summary>
13
+ /// <param name="validExitCodes">The valid exit codes for the process.</param>
14
+ /// <param name="message">The message of the exception.</param>
15
+ public InvalidExitCodeException ( int [ ] ? validExitCodes = null , string message = "Invalid ExitCode" ) : base ( message )
16
+ {
17
+ ValidExitCodes = validExitCodes ?? [ 0 ] ;
18
+ }
19
+
20
+ /// <summary>
21
+ /// Gets the array containing all valid exit codes.
22
+ /// </summary>
23
+ public int [ ] ValidExitCodes { get ; }
24
+ }
You can’t perform that action at this time.
0 commit comments