using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BookingModule.Exceptions
{
    public class BookingException : Exception
    {
        #region Fields

        private readonly BookingFault fault;
        private readonly Exception exception;

        #endregion

        #region Properties

        public BookingFault Fault
        {
            get { return this.fault; }
        }

        public Exception Exception
        {
            get { return this.exception; }
        }

        #endregion

        #region Constructors

        public BookingException(BookingFault fault)
            : base(fault.ToString())
        {
            this.fault = fault;
        }

        public BookingException(string message, BookingFault fault)
            : base(message)
        {
            this.fault = fault;
        }

        public BookingException(string message, Exception innerException, BookingFault fault)
            : base(message, innerException)
        {
            this.exception = innerException;
            this.fault = fault;
        }

        #endregion
    }
}
