textrendering/textformatting/tbox/FRMPRINT.CPP
changeset 40 91ef7621b7fc
parent 0 1fb32624e06b
child 55 336bee5c2d35
--- a/textrendering/textformatting/tbox/FRMPRINT.CPP	Mon May 03 14:13:26 2010 +0300
+++ b/textrendering/textformatting/tbox/FRMPRINT.CPP	Thu Jun 24 11:18:23 2010 +0800
@@ -19,6 +19,11 @@
 #include "FRMPRINT.H"
 #include "FRMCONST.H"
 
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "FRMPRINTTraces.h"
+#endif
+
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include "FRMCONST_INTERNAL.H"
 #include "FRMCONST_PARTNER.H"
@@ -152,7 +157,19 @@
 // Traps leaves
 //
 	{
+	if (!iPageList)
+	    {
+	    OstTrace0( TRACE_FATAL, DUP1_CTEXTPAGEREGIONPRINTER_PRINTBANDL, "EFInvalidPageList" );
+	    }
 	__ASSERT_ALWAYS(iPageList!=NULL,FormPanic(EFInvalidPageList));
+	if (aPageNo-iFirstPage>=iPageList->Count())
+	    {
+	    OstTrace0( TRACE_DUMP, CTEXTPAGEREGIONPRINTER_PRINTBANDL, "EFInvalidPageNumber" );
+	    }
+	if (aPageNo<iFirstPage)
+	    {
+	    OstTrace0( TRACE_DUMP, DUP2_CTEXTPAGEREGIONPRINTER_PRINTBANDL, "EFInvalidPageNumber" );
+	    }
 	__ASSERT_DEBUG(aPageNo-iFirstPage<iPageList->Count(),FormPanic(EFInvalidPageNumber));
 	__ASSERT_DEBUG(aPageNo>=iFirstPage,FormPanic(EFInvalidPageNumber));
 
@@ -384,7 +401,8 @@
 
 	delete iPictureGc;
 	iPictureGc=NULL;
-
+	
+	OstTrace1( TRACE_FATAL, CTEXTPAGEREGIONPRINTER_LEAVEL, "CTextPageRegionPrinter::LeaveL;aErr=%d", aErr );
 	User::Leave(aErr);
 	}