You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2006/07/08 03:51:51 UTC

svn commit: r420030 - /xerces/c/branches/xerces-2.7/src/xercesc/framework/psvi/XSValue.cpp

Author: cargilld
Date: Fri Jul  7 18:51:51 2006
New Revision: 420030

URL: http://svn.apache.org/viewvc?rev=420030&view=rev
Log:
Remove some unnecessary catch blocks.

Modified:
    xerces/c/branches/xerces-2.7/src/xercesc/framework/psvi/XSValue.cpp

Modified: xerces/c/branches/xerces-2.7/src/xercesc/framework/psvi/XSValue.cpp
URL: http://svn.apache.org/viewvc/xerces/c/branches/xerces-2.7/src/xercesc/framework/psvi/XSValue.cpp?rev=420030&r1=420029&r2=420030&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/framework/psvi/XSValue.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/framework/psvi/XSValue.cpp Fri Jul  7 18:51:51 2006
@@ -634,10 +634,6 @@
         } // end switch
         return true;  //both valid chars and within boundary
     }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
-    }
     catch (const NumberFormatException&)
     {
         //getActValue()/getCanonical() need to know the failure details
@@ -700,10 +696,6 @@
         status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 : st_FOCA0002;
         return false;
     }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
-    }
     catch (const NumberFormatException&)
     {
         //getActValue()/getCanonical() need to know the failure details
@@ -721,9 +713,7 @@
 {
     bool isValid = true;
     
-    try
-    {
-        switch (datatype) { 
+    switch (datatype) { 
         case XSValue::dt_boolean:
             {
                 unsigned int i = 0;
@@ -999,12 +989,6 @@
             status = st_NotSupported;
             isValid = false;        
             break;
-        }
-
-    }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
     }
 
     if (isValid == false && status == st_Init) {
@@ -1096,10 +1080,6 @@
             return retVal;
         }
     }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
-    }
     catch (const NumberFormatException&)
     {
         status = st_FOCA0002;
@@ -1160,16 +1140,10 @@
     catch (SchemaDateTimeException &e)
     {
         status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 : st_FOCA0002;
-        return 0;
-    }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
     }
     catch (const NumberFormatException&)
     {
         status = st_FOCA0002;
-        return 0;
     }
     return 0;
 }
@@ -1181,9 +1155,7 @@
                                ,       bool                 toValidate
                                ,       MemoryManager* const manager)
 {
-    try
-    {
-        switch (datatype) {        
+    switch (datatype) {        
         case XSValue::dt_boolean:
             {
             XMLCh* tmpStrValue = XMLString::replicate(content, manager);
@@ -1257,11 +1229,6 @@
         default:
             return 0;
             break;
-        }
-    }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
     }
 
     return 0;
@@ -1446,14 +1413,9 @@
             break;        
         } // end switch
     }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
-    }
     catch (const NumberFormatException&)
     {
-        status = st_FOCA0002;
-        return 0; 
+        status = st_FOCA0002; 
     }
     return 0; 
 }
@@ -1541,22 +1503,15 @@
 
         return retVal;
     }
-
     catch (SchemaDateTimeException const &e)
     {
         status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 : st_FOCA0002;
-        return 0;
-    }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
     }
     catch (const NumberFormatException&)
     {
         status = st_FOCA0002;
-        return 0; 
     }
-
+    return 0; 
 }
 
 XSValue*  
@@ -1567,9 +1522,7 @@
                         ,       bool                 toValidate
                         ,       MemoryManager* const manager)
 {
-    try
-    {
-        switch (datatype) { 
+    switch (datatype) { 
         case XSValue::dt_boolean: 
             {
             XMLCh* tmpStrValue = XMLString::replicate(content, manager);
@@ -1660,11 +1613,6 @@
         default:
             return 0;
             break;
-        }
-    }
-    catch(const OutOfMemoryException&)
-    {
-        throw;
     }
 
     return 0; 
@@ -1681,7 +1629,6 @@
 {
     char *nptr = XMLString::transcode(content, manager);
     ArrayJanitor<char> jan(nptr, manager);
-    int   strLen = strlen(nptr);
     char *endptr = 0;
     errno = 0;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org