diff --git a/src/xercesc/internal/WFXMLScanner.cpp b/src/xercesc/internal/WFXMLScanner.cpp
index 6303f1247113683c57a8211b25d76df8d0004085..3980c928fdd2ef9c69d9ab6d02aa0cac1ac6f337 100644
--- a/src/xercesc/internal/WFXMLScanner.cpp
+++ b/src/xercesc/internal/WFXMLScanner.cpp
@@ -198,6 +198,7 @@ void WFXMLScanner::scanDocument(const InputSource& src)
                 emitError
                 (
                     XMLErrs::XMLException_Warning
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -205,6 +206,7 @@ void WFXMLScanner::scanDocument(const InputSource& src)
                 emitError
                 (
                     XMLErrs::XMLException_Fatal
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -212,6 +214,7 @@ void WFXMLScanner::scanDocument(const InputSource& src)
                 emitError
                 (
                     XMLErrs::XMLException_Error
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -366,6 +369,7 @@ bool WFXMLScanner::scanNext(XMLPScanToken& token)
                 emitError
                 (
                     XMLErrs::XMLException_Warning
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -373,6 +377,7 @@ bool WFXMLScanner::scanNext(XMLPScanToken& token)
                 emitError
                 (
                     XMLErrs::XMLException_Fatal
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -380,6 +385,7 @@ bool WFXMLScanner::scanNext(XMLPScanToken& token)
                 emitError
                 (
                     XMLErrs::XMLException_Error
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
diff --git a/src/xercesc/internal/XMLScanner.cpp b/src/xercesc/internal/XMLScanner.cpp
index 23f1d4599d3cb638b2358ce9f8cf4f2ef8278bf0..6a6ac4474d20544efe7f5659587be9a9f7c66129 100644
--- a/src/xercesc/internal/XMLScanner.cpp
+++ b/src/xercesc/internal/XMLScanner.cpp
@@ -378,6 +378,7 @@ void XMLScanner::scanDocument(  const   XMLCh* const    systemId)
                     emitError
                     (
                         XMLErrs::XMLException_Fatal
+                        , e.getCode()
                         , e.getType()
                         , e.getMessage()
                     );
@@ -392,6 +393,7 @@ void XMLScanner::scanDocument(  const   XMLCh* const    systemId)
                     emitError
                     (
                         XMLErrs::XMLException_Fatal
+                        , e.getCode()
                         , e.getType()
                         , e.getMessage()
                     );
@@ -413,6 +415,7 @@ void XMLScanner::scanDocument(  const   XMLCh* const    systemId)
                 emitError
                 (
                     XMLErrs::XMLException_Fatal
+                    , e.getCode()
                     , e.getType()
                     , e.getMessage()
                 );
@@ -429,6 +432,7 @@ void XMLScanner::scanDocument(  const   XMLCh* const    systemId)
             emitError
             (
                 XMLErrs::XMLException_Warning
+                , excToCatch.getCode()
                 , excToCatch.getType()
                 , excToCatch.getMessage()
             );
@@ -436,6 +440,7 @@ void XMLScanner::scanDocument(  const   XMLCh* const    systemId)
             emitError
             (
                 XMLErrs::XMLException_Fatal
+                , excToCatch.getCode()
                 , excToCatch.getType()
                 , excToCatch.getMessage()
             );
@@ -443,6 +448,7 @@ void XMLScanner::scanDocument(  const   XMLCh* const    systemId)
             emitError
             (
                 XMLErrs::XMLException_Error
+                , excToCatch.getCode()
                 , excToCatch.getType()
                 , excToCatch.getMessage()
             );
@@ -491,6 +497,7 @@ bool XMLScanner::scanFirst( const   XMLCh* const    systemId
                     emitError
                     (
                         XMLErrs::XMLException_Fatal
+                        , e.getCode()
                         , e.getType()
                         , e.getMessage()
                     );
@@ -505,6 +512,7 @@ bool XMLScanner::scanFirst( const   XMLCh* const    systemId
                     emitError
                     (
                         XMLErrs::XMLException_Fatal
+                        , e.getCode()
                         , e.getType()
                         , e.getMessage()
                     );
@@ -525,6 +533,7 @@ bool XMLScanner::scanFirst( const   XMLCh* const    systemId
                 emitError
                 (
                     XMLErrs::XMLException_Fatal
+                    , e.getCode()
                     , e.getType()
                     , e.getMessage()
                 );
@@ -541,6 +550,7 @@ bool XMLScanner::scanFirst( const   XMLCh* const    systemId
             emitError
             (
                 XMLErrs::XMLException_Warning
+                , excToCatch.getCode()
                 , excToCatch.getType()
                 , excToCatch.getMessage()
             );
@@ -548,6 +558,7 @@ bool XMLScanner::scanFirst( const   XMLCh* const    systemId
             emitError
             (
                 XMLErrs::XMLException_Fatal
+                , excToCatch.getCode()
                 , excToCatch.getType()
                 , excToCatch.getMessage()
             );
@@ -555,6 +566,7 @@ bool XMLScanner::scanFirst( const   XMLCh* const    systemId
             emitError
             (
                 XMLErrs::XMLException_Error
+                , excToCatch.getCode()
                 , excToCatch.getType()
                 , excToCatch.getMessage()
             );
@@ -632,6 +644,7 @@ bool XMLScanner::scanFirst( const   InputSource&    src
                 emitError
                 (
                     XMLErrs::XMLException_Warning
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -639,6 +652,7 @@ bool XMLScanner::scanFirst( const   InputSource&    src
                 emitError
                 (
                     XMLErrs::XMLException_Fatal
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -646,6 +660,7 @@ bool XMLScanner::scanFirst( const   InputSource&    src
                 emitError
                 (
                     XMLErrs::XMLException_Error
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -1743,6 +1758,7 @@ Grammar* XMLScanner::loadGrammar(const   XMLCh* const systemId
                         emitError
                         (
                             XMLErrs::XMLException_Fatal
+                            , e.getCode()
                             , e.getType()
                             , e.getMessage()
                         );
@@ -1757,6 +1773,7 @@ Grammar* XMLScanner::loadGrammar(const   XMLCh* const systemId
                         emitError
                         (
                             XMLErrs::XMLException_Fatal
+                            , e.getCode()
                             , e.getType()
                             , e.getMessage()
                         );
@@ -1778,6 +1795,7 @@ Grammar* XMLScanner::loadGrammar(const   XMLCh* const systemId
                     emitError
                     (
                         XMLErrs::XMLException_Fatal
+                        , e.getCode()
                         , e.getType()
                         , e.getMessage()
                     );
@@ -1794,6 +1812,7 @@ Grammar* XMLScanner::loadGrammar(const   XMLCh* const systemId
                 emitError
                 (
                     XMLErrs::XMLException_Warning
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -1801,6 +1820,7 @@ Grammar* XMLScanner::loadGrammar(const   XMLCh* const systemId
                 emitError
                 (
                     XMLErrs::XMLException_Fatal
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );
@@ -1808,6 +1828,7 @@ Grammar* XMLScanner::loadGrammar(const   XMLCh* const systemId
                 emitError
                 (
                     XMLErrs::XMLException_Error
+                    , excToCatch.getCode()
                     , excToCatch.getType()
                     , excToCatch.getMessage()
                 );