public Interpreter(IGenericHelper genericHelper, IFunctionHelper functionHelper, IIntegerHelper integerHelper, IRealHelper realHelper, IBooleanHelper booleanHelper, ISetHelper setHelper, IElementHelper elementHelper, IStringHelper stringHelper, IGraphHelper graphHelper, bool catchExceptions) { _catchExceptions = catchExceptions; _exceptions = new ComponentException(); _functionHelper = functionHelper; _integerHelper = integerHelper; _integerHelper.SetInterpreter(this); _realHelper = realHelper; _realHelper.SetInterpreter(this); _booleanHelper = booleanHelper; _booleanHelper.SetInterpreter(this); _genericHelper = genericHelper; _genericHelper.SetInterpreter(this); _setHelper = setHelper; _setHelper.SetInterpreter(this); _elementHelper = elementHelper; _elementHelper.SetInterpreter(this); _stringHelper = stringHelper; _stringHelper.SetInterpreter(this); _graphHelper = graphHelper; _graphHelper.SetInterpreter(this); }
public DocumentResolution HandleException(IPipelineComponent component, ComponentException exception) { if (exception is PoisonComponentException) { return(DocumentResolution.PoisonComponentAndContinue); } return(DocumentResolution.CompleteSuccess); }
private void ProcessDocument(object context) { DocumentContext documentContext = context as DocumentContext; Util.ThrowOnNullArgument(documentContext, "context"); IDocument document = documentContext.Document; Util.ThrowOnNullArgument(document, "document"); AsyncResult asyncResult = documentContext.AsyncResult; this.DiagnosticsSession.TraceDebug <IIdentity>("Called begin process - {0} ", document.Identity); ComponentException ex = null; try { this.InternalProcessDocument(documentContext); } catch (OperationFailedException ex2) { ex = ex2; } catch (ComponentFailedException ex3) { this.OnFailed(new FailedEventArgs(ex3)); ex = ex3; } catch (Exception ex4) { if (ex4 is OutOfMemoryException || ex4 is StackOverflowException || ex4 is ThreadAbortException) { throw; } if (!(ex4 is QuotaExceededException)) { this.DiagnosticsSession.SendInformationalWatsonReport(ex4, null); } ex = new PoisonComponentException(ex4); } if (ex != null) { this.DiagnosticsSession.TraceError <Type, string>("Received an exception of type = {0} and message = {1} ", ex.GetType(), ex.Message); asyncResult.SetAsCompleted(ex); return; } asyncResult.SetAsCompleted(); }
public ReferenceHandler(IReferenceHelper helper, bool catchExceptions) : this(helper) { _catchExceptions = catchExceptions; _exceptions = new ComponentException(); }