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

namespace DXGfxLib
{
    /// <summary>
    /// Now that we use Effects, this means that at some point we do load them and compile them. This exception type
    /// is designed specifficaly for situations were bad things did happen during the compilation of the effect file.
    /// </summary>
    public class EffectException : Exception
    {
        /// <summary>
        /// This strings contains the error string returned during the compilation of the effect.
        /// </summary>
        public string effectValidationError = "No output!";

        /// <summary>
        /// Information regarding which effect we were processing.
        /// </summary>
        public string effectFileName = "";

        /// <summary>
        /// The constructor, we should pass the message the effect filename, the error string returned by the compilation
        /// and the exception we catched before creating an instance of this specific class.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="fileName"></param>
        /// <param name="strErr"></param>
        /// <param name="innerException"></param>
        public EffectException(string message, string fileName, string strErr, Exception innerException)
            : base(message, innerException)
        {
            effectFileName = fileName;
            effectValidationError = strErr;
        }
    }
}
