Is it good practice to throw exceptions in virtual functions?
<p><em>Even though the solution is so obvious I should have never have posted this, I'm leaving it up as a reminder and a useful point of reference to others.</em></p>

<p>I've got the following base class:</p>

<pre><code>using System;

namespace LibraryWPF
{
    public class Library
    {
        /// &lt;summary&gt;
        /// Event fired when content is added to the libary
        /// &lt;/summary&gt;
        public event EventHandler&lt;ObjectInfoEventArgs&gt; Library_ObjectAdded;

        /// &lt;summary&gt;
        /// Event fired when the scan of the library is finished
        /// &lt;/summary&gt;
        public event EventHandler Library_Finished;

        // Properties

        /// &lt;summary&gt;
        /// Whether to stop checking the library or not
        /// &lt;/summary&gt;
        public bool Stop
        {
            get;
            set;
        }

        /// &lt;summary&gt;
        /// Where to look for content
        /// &lt;/summary&gt;
        public string Root
        {
            get;
            set;
        }

        /// &lt;summary&gt;
        /// Empty instance of library's object for reflection
        /// &lt;/summary&gt;
        public virtual object ObjectInfo
        {
            get
            {
                // Should this raise as exception to show if it's not been overridden?
                return null;
            }
        }

        /// &lt;summary&gt;
        /// Sub class overrides this method to call it's actual find code
        /// &lt;/summary&gt;
        public virtual void Find()
        {
            // Should this raise as exception to show if it's not been overridden?
        }

        /// &lt;summary&gt;
        /// Build the library
        /// &lt;/summary&gt;
        public void Build()
        {
            if (Root != null &amp;&amp; Root.Length &gt; 0)
            {
                Stop = false;
                Find();
            }

            // Final update
            if (Library_Finished != null)
            {
                Library_Finished(this, null);
            }
        }

        /// &lt;summary&gt;
        /// Sub class calls this method to fire the ObjectAdded event
        /// &lt;/summary&gt;
        /// &lt;param name="objectInfo"&gt;Object just added to library&lt;/param&gt;
        protected void OnObjectAdded(object objectInfo)
        {
            if (Library_ObjectAdded != null)
            {
                Library_ObjectAdded(this, new ObjectInfoEventArgs(objectInfo));
            }
        }
    }
}
</code></pre>

<p>The sub-classes override <code>ObjectInfo</code> to return an instance of the type of object they're looking for use by reflection. They also override <code>Find</code> to do the actual searching.</p>

<p>This way my application code can use the base class methods so it doesn't have to know anything about the sub-classes at compile time. I tell it what sort of content to look for using DI.</p>

<p>So - my question is this:</p>

<p>Should I throw an exception in the base class versions of <code>ObjectInfo</code> and <code>Find</code> so that if the sub-classes aren't implemented properly I get a run-time error? Or should I code for <code>ObjectInfo</code> returning <code>null</code>?</p>
