/* Exceptional.cs Copyright © 2008 Diversified Technical Systems, Inc. All Rights Reserved */ using System; namespace DatabaseExport { /// /// "Ultimate" base class for all DTS classes that expect to throw exceptions. /// Deriving classes from this class allows exceptions to be trapped based on /// the class type that threw them. /// /// /// /// Sample usage: /// public class A : Exceptional /// { /// public void ScrewItUp( ) /// { /// private bool error = true; /// if ( error ) throw new A.Exception( "Class A-specific screwup." ); /// } /// } /// /// ... /// /// try /// { /// A.ScrewItUp( ); /// B.ScrewItUp( ); /// C.ScrewItUp( ); /// } /// catch ( A.Exception ex ) /// { /// // Can pick A's exceptions out of a crowd, or not and just treat it /// // polymorphically as a System.Exception. /// } /// /// [Serializable] public abstract class Exceptional { } }