(file) Return to CQLUtilities.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL

Diff for /pegasus/src/Pegasus/CQL/CQLUtilities.cpp between version 1.7 and 1.8

version 1.7, 2004/12/03 00:37:33 version 1.8, 2004/12/07 19:34:20
Line 76 
Line 76 
   const Char16* p = stringNum.getChar16Data();   const Char16* p = stringNum.getChar16Data();
   const Char16* pStart = p;   const Char16* pStart = p;
  
     if (String::equal(stringNum, String::EMPTY))
     {
       MessageLoaderParms mload(String("CQL.CQLUtilities.EMPTY_STRING"),
                                String("String cannot be empty."));
       throw CQLRuntimeException(mload);
     }
   
   if (!p)   if (!p)
   {   {
     MessageLoaderParms mload(String("CQL.CQLUtilities.NULL_INPUT"),     MessageLoaderParms mload(String("CQL.CQLUtilities.NULL_INPUT"),
                              String("String cannot be NULL or empty."));                               String("String cannot be NULL."));
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
  
Line 87 
Line 94 
   if (*p == '-')   if (*p == '-')
   {   {
      MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_NEG"),      MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_NEG"),
                               String("String $0 cannot being with '-'."),                                String("String $0 cannot begin with '-'."),
                               stringNum);                               stringNum);
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
Line 240 
Line 247 
   if (*p)   if (*p)
   {   {
       MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_DECIMAL_CHAR"),       MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_DECIMAL_CHAR"),
                                String("String $0 has a non-decimal digit character"),                                 String("String $0 has a non-decimal digit character $1"),
                                stringNum);                                 stringNum, String(p));
       throw CQLRuntimeException(mload);       throw CQLRuntimeException(mload);
   }   }
  
Line 259 
Line 266 
   const Char16* p = stringNum.getChar16Data();   const Char16* p = stringNum.getChar16Data();
   const Char16* pStart = p;   const Char16* pStart = p;
  
     if (String::equal(stringNum, String::EMPTY))
     {
       MessageLoaderParms mload(String("CQL.CQLUtilities.EMPTY_STRING"),
                                String("String cannot be empty."));
       throw CQLRuntimeException(mload);
     }
   
   if (!p)   if (!p)
   {   {
     MessageLoaderParms mload(String("CQL.CQLUtilities.NULL_INPUT"),     MessageLoaderParms mload(String("CQL.CQLUtilities.NULL_INPUT"),
                              String("String cannot be NULL or empty."));                               String("String cannot be NULL."));
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
  
Line 454 
Line 468 
   if (*p)   if (*p)
   {   {
     MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_DECIMAL_CHAR"),     MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_DECIMAL_CHAR"),
                              String("String $0 has a non-decimal digit character"),                               String("String $0 has a non-decimal digit character $1"),
                              stringNum);                               stringNum, String(p));
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
  
Line 487 
Line 501 
   Boolean neg = false;   Boolean neg = false;
   const Char16* pStart = p;   const Char16* pStart = p;
  
   if (!*p)    if (String::equal(stringNum, String::EMPTY))
     {
       MessageLoaderParms mload(String("CQL.CQLUtilities.EMPTY_STRING"),
                                String("String cannot be empty."));
       throw CQLRuntimeException(mload);
     }
   
     if (!p)
   {   {
     MessageLoaderParms mload(String("CQL.CQLUtilities.NULL_INPUT"),     MessageLoaderParms mload(String("CQL.CQLUtilities.NULL_INPUT"),
                              String("String cannot be NULL or empty."));                               String("String cannot be NULL."));
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
  
Line 587 
Line 608 
         p++;         p++;
     }     }
   } // end-if optional decimal point   } // end-if optional decimal point
   if (*p)    if (*p && p - pStart <= stringNum.size())
   {   {
     //  printf("This is char # %d\n", p - pStart);
     MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_DECIMAL_CHAR"),     MessageLoaderParms mload(String("CQL.CQLUtilities.INVALID_DECIMAL_CHAR"),
                              String("String $0 has a non-decimal digit character"),                               String("String $0 has a non-decimal digit character $1"),
                              stringNum);                               stringNum,
                                String(p));
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
   //   //
Line 609 
Line 632 
     throw CQLRuntimeException(mload);     throw CQLRuntimeException(mload);
   }   }
   PEG_METHOD_EXIT();   PEG_METHOD_EXIT();
     printf("String %s = %.16e\n", (const char *)stringNum.getCString(), x);
   //  printf("Num %e = \n", x);
   return x;   return x;
 } }
  


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2