50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
|
|
/*
|
|||
|
|
Exceptional.cs
|
|||
|
|
|
|||
|
|
Copyright © 2008
|
|||
|
|
Diversified Technical Systems, Inc.
|
|||
|
|
All Rights Reserved
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace DatabaseExport
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// "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.
|
|||
|
|
/// </summary>
|
|||
|
|
///
|
|||
|
|
/// <remarks>
|
|||
|
|
/// 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.
|
|||
|
|
/// }
|
|||
|
|
/// </remarks>
|
|||
|
|
///
|
|||
|
|
[Serializable]
|
|||
|
|
public abstract class Exceptional
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
}
|