Пример #1
0
        public static ExeSysException NewApplicationException(Exception innerExcp)
        {
            String msg = "Application - caught an exception - see inner ";

            ExeSysException outException = new ExeSysException(null, msg, innerExcp);

            return(outException);
        }
Пример #2
0
        public ExeSysException NewUnCaughtExeSysException(Exception innerExcp)
        {
            String msg = "Execution System - failed to catch an exception - see inner ";

            ExeSysException outException = new ExeSysException(this, msg, innerExcp);

            return(outException);
        }
Пример #3
0
        public ExeSysException NewExeSysException(Exception innerExcp)
        {
            String msg = "Execution System - Execute() caught an exception - see inner ";

            ExeSysException outException = new ExeSysException(this, msg, innerExcp);

            return(outException);
        }
Пример #4
0
        public ExeSysException NewExecuteDurationException()
        {
            String msg = "Execution System - Execute() duration exceeded configured threshold of: ";

            msg += ExecutionPolicy.MS_ExeDuration.ToString() + " (ms).";

            ExeSysException outException = new ExeSysException(this, msg);

            return(outException);
        }
Пример #5
0
        public ExeSysException NewConsecutiveExcpsException()
        {
            String msg = "Execution System - Execute() consecutive exception threshhold exceeded (threshhold): ";

            msg += ExecutionPolicy.Threshhold_ConsecExcps.ToString() + " consecutive exceptions without successful code execution.";

            ExeSysException outException = new ExeSysException(this, msg);

            return(outException);
        }
Пример #6
0
        /// <summary>
        /// Execute() Case Function to handle exceptions
        /// </summary>
        void HandleExceptions()
        {
            // at this point, all exceptions are in the list
            for (int i = exception_list.Count; i > 0; i--)
            {
                // could be exesysexception, or moduleexception...
                if (typeof(ModuleException).IsInstanceOfType(exception_list[i]))
                {
                    ModuleException modException = (ModuleException)exception_list[i];
                    // let the module handle it...
                }
                else if (typeof(ExeSysException).IsInstanceOfType(exception_list[i]))
                {
                    ExeSysException exeException = (ExeSysException)exception_list[i];
                    // basically need to decide to terminate or keep going and if to reset the initialized flag
                }

                // log exceptions if logging enabled (through what file system module???)
                LogExceptions();

                // advertise it
                AdvertiseExceptions();
            }
        }