Is there a subtle error in this type?
<p>Found this in our codebase and took a while to figure out (and had to use a debugger). This class does really only one thing but not quite as intended.</p>

<p>Thought I'd share!</p>

<p><strong>EDIT</strong> Got rid of the syntax error, sorry!</p>

<pre><code>public class RecordNotFoundException : ApplicationException
{       
    readonly string _entityName;
    public string EntityName
    {
        get { return _entityName; }
    }

    readonly string _details;

    public override string Message
    {
        get
        {
           return string.Format("Can't find a record for {0}.", _entityName)
            + _details != null ? string.Format(" Details: {0}", _details) : "";
        }
    }

    public RecordNotFoundException(string entityName)
    {
        _entityName = entityName;
    }

    public RecordNotFoundException(string entityName, string details)
        : this(entityName)
    {
        _details = details;
    }
}
</code></pre>
