bool ProtectCall(Action <PipelineInputPdfPage> callback, PipelineInputPdfPage pdfPage)
        {
            if (!g_continueOnException)
            {
                callback(pdfPage);
                return(true);
            }

            try
            {
                callback(pdfPage);
                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                System.Diagnostics.Debug.WriteLine(ex.ToString());

                bool hasOutput = (_pdfOutput != null);
                if (hasOutput)
                {
                    PipelineDebug.ShowException(this, ex);
                }

                StoreStatistics(new StatsExceptionHandled(pdfPage.GetPageNumber(), ex));
                StoreStatistics(pdfPage.GetPageNumber(), new StatsExceptionHandled(pdfPage.GetPageNumber(), ex));
            }

            return(false);
        }
        public PipelinePage PrintWarnings()
        {
            var warnings = PdfReaderException.GetPageWarnings();

            if (warnings.Count() > 0)
            {
                PipelineDebug.ShowWarnings(this.ParentContext, warnings);
            }

            return(this);
        }
Beispiel #3
0
        public PipelineText <TT> Show(Color Color)
        {
            PipelineDebug.Show((PipelineInputPdf)Context, CurrentStream, Color);

            return(this);
        }
        //static public PipelineText Output(this PipelineText page, string filename)
        //{
        //    PipelineDebug.Output(page.Context, filename);

        //    return page;
        //}

        static public PipelineText <T> DebugBreak <T>(this PipelineText <T> page, Func <PipelineText <T>, bool> condition = null)
        {
            PipelineDebug.DebugBreak(page, condition);

            return(page);
        }
 static public PipelinePage ShowLine(this PipelinePage page, Color color)
 {
     PipelineDebug.ShowLine((PipelineInputPdf)page.Context, page.LastResult, color);
     return(page);
 }
 static public PipelinePage DebugBreak(this PipelinePage page, Func <PipelinePage, bool> condition = null)
 {
     PipelineDebug.DebugBreak(page, condition);
     return(page);
 }
 static public PipelinePage Output(this PipelinePage page, string filename)
 {
     PipelineDebug.Output((PipelineInputPdf)page.Context, filename);
     return(page);
 }