Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
81f77850
Commit
81f77850
authored
Jun 10, 2014
by
deepakverma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add innerexception message in case of a fault
parent
bb3b5e69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+3
-1
ExceptionFactory.cs
StackExchange.Redis/StackExchange/Redis/ExceptionFactory.cs
+2
-2
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
81f77850
...
@@ -762,7 +762,7 @@ public static ConnectionMultiplexer Connect(ConfigurationOptions configuration,
...
@@ -762,7 +762,7 @@ public static ConnectionMultiplexer Connect(ConfigurationOptions configuration,
throw
new
TimeoutException
();
throw
new
TimeoutException
();
}
}
}
}
if
(!
task
.
Result
)
throw
ExceptionFactory
.
UnableToConnect
(
);
if
(!
task
.
Result
)
throw
ExceptionFactory
.
UnableToConnect
(
muxer
.
failureMessage
);
killMe
=
null
;
killMe
=
null
;
return
muxer
;
return
muxer
;
}
}
...
@@ -772,6 +772,7 @@ public static ConnectionMultiplexer Connect(ConfigurationOptions configuration,
...
@@ -772,6 +772,7 @@ public static ConnectionMultiplexer Connect(ConfigurationOptions configuration,
}
}
}
}
private
string
failureMessage
;
private
readonly
Hashtable
servers
=
new
Hashtable
();
private
readonly
Hashtable
servers
=
new
Hashtable
();
private
volatile
ServerEndPoint
[]
serverSnapshot
=
NilServers
;
private
volatile
ServerEndPoint
[]
serverSnapshot
=
NilServers
;
...
@@ -1183,6 +1184,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
...
@@ -1183,6 +1184,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
foreach
(
var
ex
in
aex
.
InnerExceptions
)
foreach
(
var
ex
in
aex
.
InnerExceptions
)
{
{
LogLocked
(
log
,
"{0} faulted: {1}"
,
Format
.
ToString
(
endpoints
[
i
]),
ex
.
Message
);
LogLocked
(
log
,
"{0} faulted: {1}"
,
Format
.
ToString
(
endpoints
[
i
]),
ex
.
Message
);
failureMessage
=
ex
.
Message
;
}
}
}
}
else
if
(
task
.
IsCanceled
)
else
if
(
task
.
IsCanceled
)
...
...
StackExchange.Redis/StackExchange/Redis/ExceptionFactory.cs
View file @
81f77850
...
@@ -106,10 +106,10 @@ static string GetLabel(bool includeDetail, RedisCommand command, Message message
...
@@ -106,10 +106,10 @@ static string GetLabel(bool includeDetail, RedisCommand command, Message message
return
message
==
null
?
command
.
ToString
()
:
(
includeDetail
?
message
.
CommandAndKey
:
message
.
Command
.
ToString
());
return
message
==
null
?
command
.
ToString
()
:
(
includeDetail
?
message
.
CommandAndKey
:
message
.
Command
.
ToString
());
}
}
internal
static
Exception
UnableToConnect
()
internal
static
Exception
UnableToConnect
(
string
failureMessage
=
null
)
{
{
return
new
RedisConnectionException
(
ConnectionFailureType
.
UnableToConnect
,
return
new
RedisConnectionException
(
ConnectionFailureType
.
UnableToConnect
,
"It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail
"
);
"It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail
. "
+
failureMessage
);
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment