public static ExeSysException NewApplicationException(Exception innerExcp) { String msg = "Application - caught an exception - see inner "; ExeSysException outException = new ExeSysException(null, msg, innerExcp); return(outException); }
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); }
public ExeSysException NewExeSysException(Exception innerExcp) { String msg = "Execution System - Execute() caught an exception - see inner "; ExeSysException outException = new ExeSysException(this, msg, innerExcp); return(outException); }
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); }
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); }
/// <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(); } }