Commit d27aaa44 authored by Marc Gravell's avatar Marc Gravell

show the result value in MessageFaulted, even if that means hydrating a RawResult to string

parent 38eff80d
......@@ -591,7 +591,7 @@ internal bool ComputeResult(PhysicalConnection connection, RawResult result)
}
catch (Exception ex)
{
connection?.BridgeCouldBeNull?.Multiplexer?.OnMessageFaulted(this, ex);
connection?.BridgeCouldBeNull?.Multiplexer?.OnMessageFaulted(this, ex, value: result.ToString());
box?.SetException(ex);
return box != null; // we still want to pulse/complete
}
......
......@@ -73,7 +73,7 @@ public override string ToString()
case ResultType.Error:
return $"{Type}: {GetString()}";
case ResultType.BulkString:
return $"{Type}: {Payload.Length} bytes";
return $"{Type}: {GetString()}";
case ResultType.MultiBulk:
return $"{Type}: {ItemsCount} items";
default:
......
......@@ -258,9 +258,9 @@ internal string GetConnectionName(EndPoint endPoint, ConnectionType connectionTy
internal event Action<EndPoint, ConnectionType> Connecting;
internal event Action<EndPoint, ConnectionType> Resurrecting;
internal void OnMessageFaulted(Message msg, Exception fault, [CallerMemberName] string origin = default, [CallerFilePath] string path = default, [CallerLineNumber] int lineNumber = default)
internal void OnMessageFaulted(Message msg, Exception fault, [CallerMemberName] string origin = default, [CallerFilePath] string path = default, [CallerLineNumber] int lineNumber = default, string value = default)
{
MessageFaulted?.Invoke(msg?.CommandAndKey, fault, $"{origin} ({path}#{lineNumber})");
MessageFaulted?.Invoke(msg?.CommandAndKey, fault, $"{origin} ({path}#{lineNumber}) {value}");
}
internal void OnClosing(bool complete)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment