Skip to content

Commit

Permalink
Adding readability overrides to failure messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullin committed Jul 20, 2011
1 parent 66f47ce commit 587467f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Expand Up @@ -14,5 +14,10 @@ public EnvelopeQuarantined(Exception lastException, ImmutableEnvelope envelope,
Envelope = envelope;
QueueName = queueName;
}

public override string ToString()
{
return string.Format("Quarantined '{0}' of '{1}'", Envelope.EnvelopeId, QueueName);
}
}
}
Expand Up @@ -9,6 +9,9 @@

namespace Lokad.Cqrs.Core.Inbox.Events
{
/// <summary>
/// Raised when something goes wrong with the envelope deserialization (i.e.: unknown format or contract)
/// </summary>
public sealed class EnvelopeDeserializationFailed : ISystemEvent
{
public Exception Exception { get; private set; }
Expand All @@ -21,5 +24,10 @@ public EnvelopeDeserializationFailed(Exception exception, string queueName, stri
QueueName = queueName;
MessageId = messageId;
}

public override string ToString()
{
return string.Format("Failed to deserialize '{0}' from '{1}': {2}", MessageId, QueueName, Exception.Message);
}
}
}

0 comments on commit 587467f

Please sign in to comment.