version 1.65, 2002/08/14 22:32:23
|
version 1.66, 2002/08/20 17:39:37
|
|
|
return false; | return false; |
| |
char buffer[62]; | char buffer[62]; |
sprintf(buffer, "Bad %s.%s attribute value", attributeName, tagName); |
sprintf(buffer, "Invalid %s.%s attribute value", attributeName, tagName); |
throw XmlSemanticError(lineNumber, buffer); | throw XmlSemanticError(lineNumber, buffer); |
return false; | return false; |
} | } |
|
|
return CIMValue(false); | return CIMValue(false); |
else | else |
throw XmlSemanticError( | throw XmlSemanticError( |
lineNumber, "Bad boolean value"); |
lineNumber, "Invalid boolean value"); |
} | } |
| |
case CIMTYPE_STRING: | case CIMTYPE_STRING: |
|
|
case CIMTYPE_CHAR16: | case CIMTYPE_CHAR16: |
{ | { |
if (strlen(valueString) != 1) | if (strlen(valueString) != 1) |
throw XmlSemanticError(lineNumber, "Bad char16 value"); |
throw XmlSemanticError(lineNumber, "Invalid char16 value"); |
| |
return CIMValue(Char16(valueString[0])); | return CIMValue(Char16(valueString[0])); |
} | } |
|
|
if (!stringToUnsignedInteger(valueString, x)) | if (!stringToUnsignedInteger(valueString, x)) |
{ | { |
throw XmlSemanticError( | throw XmlSemanticError( |
lineNumber, "Bad unsigned integer value"); |
lineNumber, "Invalid unsigned integer value"); |
} | } |
| |
switch (type) | switch (type) |
|
|
if (!stringToSignedInteger(valueString, x)) | if (!stringToSignedInteger(valueString, x)) |
{ | { |
throw XmlSemanticError( | throw XmlSemanticError( |
lineNumber, "Bad signed integer value"); |
lineNumber, "Invalid signed integer value"); |
} | } |
| |
switch (type) | switch (type) |
|
|
{ | { |
tmp.set(valueString); | tmp.set(valueString); |
} | } |
catch (BadDateTimeFormat&) |
catch (InvalidDateTimeFormatException&) |
{ | { |
throw XmlSemanticError(lineNumber, "Bad datetime value"); |
throw XmlSemanticError(lineNumber, "Invalid datetime value"); |
} | } |
| |
return CIMValue(tmp); | return CIMValue(tmp); |
|
|
Real64 x; | Real64 x; |
| |
if (!stringToReal(valueString, x)) | if (!stringToReal(valueString, x)) |
throw XmlSemanticError(lineNumber, "Bad real number value"); |
throw XmlSemanticError(lineNumber, "Invalid real number value"); |
| |
return CIMValue(Real32(x)); | return CIMValue(Real32(x)); |
} | } |
|
|
Real64 x; | Real64 x; |
| |
if (!stringToReal(valueString, x)) | if (!stringToReal(valueString, x)) |
throw XmlSemanticError(lineNumber, "Bad real number value"); |
throw XmlSemanticError(lineNumber, "Invalid real number value"); |
| |
return CIMValue(x); | return CIMValue(x); |
} | } |
|
|
{ | { |
container.addQualifier(qualifier); | container.addQualifier(qualifier); |
} | } |
catch (AlreadyExists&) |
catch (AlreadyExistsException&) |
{ | { |
throw XmlSemanticError(parser.getLine(), "duplicate qualifier"); | throw XmlSemanticError(parser.getLine(), "duplicate qualifier"); |
} | } |
|
|
{ | { |
container.addProperty(property); | container.addProperty(property); |
} | } |
catch (AlreadyExists&) |
catch (AlreadyExistsException&) |
{ | { |
throw XmlSemanticError(parser.getLine(), "duplicate property"); | throw XmlSemanticError(parser.getLine(), "duplicate property"); |
} | } |
|
|
{ | { |
container.addParameter(parameter); | container.addParameter(parameter); |
} | } |
catch (AlreadyExists&) |
catch (AlreadyExistsException&) |
{ | { |
throw XmlSemanticError(parser.getLine(), "duplicate parameter"); | throw XmlSemanticError(parser.getLine(), "duplicate parameter"); |
} | } |
|
|
| |
if (!entry.getAttributeValue("ID", id)) | if (!entry.getAttributeValue("ID", id)) |
throw XmlValidationError(parser.getLine(), | throw XmlValidationError(parser.getLine(), |
"Bad or missing MESSAGE.ID attribute"); |
"Invalid or missing MESSAGE.ID attribute"); |
| |
// Get MESSAGE.PROTOCOLVERSION: | // Get MESSAGE.PROTOCOLVERSION: |
| |
if (!entry.getAttributeValue("PROTOCOLVERSION", protocolVersion)) | if (!entry.getAttributeValue("PROTOCOLVERSION", protocolVersion)) |
throw XmlValidationError(parser.getLine(), | throw XmlValidationError(parser.getLine(), |
"Bad or missing MESSAGE.PROTOCOLVERSION attribute"); |
"Invalid or missing MESSAGE.PROTOCOLVERSION attribute"); |
| |
return true; | return true; |
} | } |
|
|
result = false; | result = false; |
else | else |
throw XmlSemanticError(parser.getLine(), | throw XmlSemanticError(parser.getLine(), |
"Bad value for VALUE element: must be \"TRUE\" or \"FALSE\""); |
"Invalid value for VALUE element: must be \"TRUE\" or \"FALSE\""); |
| |
expectEndTag(parser, "VALUE"); | expectEndTag(parser, "VALUE"); |
| |