-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw the new
DockerUnavailableException
when Docker is not available
(because it is either not running or misconfigured) The `ArgumentException` was not the appropriate exception to throw since the root of the problem is not a bad argument but the state of the system which is wrong.
- Loading branch information
Showing
4 changed files
with
53 additions
and
19 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
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,20 @@ | ||
namespace DotNet.Testcontainers | ||
{ | ||
using System; | ||
using JetBrains.Annotations; | ||
|
||
/// <summary> | ||
/// The exception that is thrown when Docker is not available (because it is either not running or misconfigured). | ||
/// </summary> | ||
[PublicAPI] | ||
public sealed class DockerUnavailableException : Exception | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DockerUnavailableException"/> class, using the provided message. | ||
/// </summary> | ||
/// <param name="message">The error message that explains the reason for the exception.</param> | ||
public DockerUnavailableException(string message) : base(message) | ||
{ | ||
} | ||
} | ||
} |