Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public PipelinePage PrintWarnings()
        {
            var warnings = PdfReaderException.GetPageWarnings();

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

            return(this);
        }
Esempio n. 3
0
        //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);
        }
Esempio n. 4
0
 static public PipelinePage ShowLine(this PipelinePage page, Color color)
 {
     PipelineDebug.ShowLine((PipelineInputPdf)page.Context, page.LastResult, color);
     return(page);
 }
Esempio n. 5
0
 static public PipelinePage DebugBreak(this PipelinePage page, Func <PipelinePage, bool> condition = null)
 {
     PipelineDebug.DebugBreak(page, condition);
     return(page);
 }
Esempio n. 6
0
 static public PipelinePage Output(this PipelinePage page, string filename)
 {
     PipelineDebug.Output((PipelineInputPdf)page.Context, filename);
     return(page);
 }
Esempio n. 7
0
        public PipelineText <TT> Show(Color Color)
        {
            PipelineDebug.Show((PipelineInputPdf)Context, CurrentStream, Color);

            return(this);
        }