예제 #1
0
        /// <summary>
        ///     Starts a catch block
        /// </summary>
        /// <param name="exceptionType">Exception type to catch</param>
        /// <returns>The resulting catch block</returns>
        public virtual Catch Catch(Type exceptionType)
        {
            var tempCommand = new Catch(exceptionType);

            tempCommand.Setup();
            Commands.Add(tempCommand);
            tempCommand.Exception = CreateLocal(
                "ExceptionLocal" + ObjectCounter.ToString(CultureInfo.InvariantCulture), exceptionType);
            tempCommand.Exception.Save(Generator);
            ++ObjectCounter;
            return(tempCommand);
        }