Skip to content

Commit 8856862

Browse files
authored
Throw RedisConnectionException instead of NotImplementedException (#1633)
1 parent 1920f5a commit 8856862

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/StackExchange.Redis/ConnectionMultiplexer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,8 @@ internal void InitializeSentinel(LogProxy logProxy)
23512351
public ConnectionMultiplexer GetSentinelMasterConnection(ConfigurationOptions config, TextWriter log = null)
23522352
{
23532353
if (ServerSelectionStrategy.ServerType != ServerType.Sentinel)
2354-
throw new NotImplementedException("The ConnectionMultiplexer is not a Sentinel connection.");
2354+
throw new RedisConnectionException(ConnectionFailureType.UnableToConnect,
2355+
"Sentinel: The ConnectionMultiplexer is not a Sentinel connection.");
23552356

23562357
if (string.IsNullOrEmpty(config.ServiceName))
23572358
throw new ArgumentException("A ServiceName must be specified.");

0 commit comments

Comments
 (0)