Click here to Skip to main content
15,886,110 members
Articles / Web Development / HTML

Windows and Web Generic Components

Rate me:
Please Sign up or sign in to vote.
4.08/5 (7 votes)
23 Jul 2008CPOL4 min read 27.3K   742   15  
A method to create Windows and Web components with the same interface
using System;
using System.Collections.Generic;
using System.Text;

namespace Framework.Lib
{
    public class wiseException : System.Exception
    {

        #region string Message
        public new string Message
        {
            get
            {
                return base.Message;
            }
        }
        #endregion

        #region Exception InnerException
        public new Exception InnerException
        {
            get
            {
                return base.InnerException;
            }
        }
        #endregion 

        #region Constructor
        public wiseException()
            : base()
        {
        }

        public wiseException(string message)
            : base(message)
        {
        }

        public wiseException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        public wiseException(Exception theException, System.Reflection.MethodBase theMethod)
            : base("***"+((System.Reflection.MemberInfo)(theMethod)).DeclaringType.FullName + "." + 
            theMethod.Name + ": " + theException.Message + "***", theException)
        {
            
        }
        #endregion
    }

    #region baControllerException
    /// <summary>
    /// Controller Exceptions
    /// </summary>
    public class baControllerException : wiseException
    {
        public baControllerException(Exception theException, System.Reflection.MethodBase theMethod)
            : base(theException, theMethod)
        {
        }
    }
    #endregion

    #region baDALException
    /// <summary>
    /// Data Access Layer Exceptions
    /// </summary>
    public class baDALException : wiseException
    {
        public baDALException(Exception theException, System.Reflection.MethodBase theMethod)
            : base(theException, theMethod)
        {
        }
    }
    #endregion

    #region baModelException
    /// <summary>
    /// Model Layer Exceptions
    /// </summary>
    public class baModelException : wiseException
    {
        public baModelException(Exception theException, System.Reflection.MethodBase theMethod)
            : base(theException, theMethod)
        {
        }
    }
    #endregion

    #region baTransportationException
    /// <summary>
    /// Transportation layer exceptions
    /// </summary>
    public class baTransportationException : wiseException
    {
        public baTransportationException(Exception theException, System.Reflection.MethodBase theMethod)
            : base(theException, theMethod)
        {
        }
    }
    #endregion
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
Software development experience since 1993

Skills
- Programming Languages: C# .NET, Delphi, C++, Java and VB
- Development Methodologies (SDLC): RUP, Scrum and XP
- Database: SQL server, Oracle, Apollo database and MS Access.

Educations & Certificates
- Microsoft® Certified Professional (MCP)
- Sun® Certified Java2 Programmer
- B.S. in computer science

Comments and Discussions