diff options
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r-- | linden/indra/llcommon/llsdserialize.cpp | 46 | ||||
-rw-r--r-- | linden/indra/llcommon/llsdserialize_xml.cpp | 23 |
2 files changed, 43 insertions, 26 deletions
diff --git a/linden/indra/llcommon/llsdserialize.cpp b/linden/indra/llcommon/llsdserialize.cpp index 9f4ce64..e2be922 100644 --- a/linden/indra/llcommon/llsdserialize.cpp +++ b/linden/indra/llcommon/llsdserialize.cpp | |||
@@ -441,7 +441,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
441 | } | 441 | } |
442 | if(istr.fail()) | 442 | if(istr.fail()) |
443 | { | 443 | { |
444 | llinfos << "STREAM FAILURE reading map." << llendl; | 444 | llwarns << "STREAM FAILURE reading map." << llendl; |
445 | parse_count = PARSE_FAILURE; | 445 | parse_count = PARSE_FAILURE; |
446 | } | 446 | } |
447 | break; | 447 | break; |
@@ -460,7 +460,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
460 | } | 460 | } |
461 | if(istr.fail()) | 461 | if(istr.fail()) |
462 | { | 462 | { |
463 | llinfos << "STREAM FAILURE reading array." << llendl; | 463 | llwarns << "STREAM FAILURE reading array." << llendl; |
464 | parse_count = PARSE_FAILURE; | 464 | parse_count = PARSE_FAILURE; |
465 | } | 465 | } |
466 | break; | 466 | break; |
@@ -496,7 +496,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
496 | } | 496 | } |
497 | if(istr.fail()) | 497 | if(istr.fail()) |
498 | { | 498 | { |
499 | llinfos << "STREAM FAILURE reading boolean." << llendl; | 499 | llwarns << "STREAM FAILURE reading boolean." << llendl; |
500 | parse_count = PARSE_FAILURE; | 500 | parse_count = PARSE_FAILURE; |
501 | } | 501 | } |
502 | break; | 502 | break; |
@@ -522,7 +522,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
522 | } | 522 | } |
523 | if(istr.fail()) | 523 | if(istr.fail()) |
524 | { | 524 | { |
525 | llinfos << "STREAM FAILURE reading boolean." << llendl; | 525 | llwarns << "STREAM FAILURE reading boolean." << llendl; |
526 | parse_count = PARSE_FAILURE; | 526 | parse_count = PARSE_FAILURE; |
527 | } | 527 | } |
528 | break; | 528 | break; |
@@ -535,7 +535,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
535 | data = integer; | 535 | data = integer; |
536 | if(istr.fail()) | 536 | if(istr.fail()) |
537 | { | 537 | { |
538 | llinfos << "STREAM FAILURE reading integer." << llendl; | 538 | llwarns << "STREAM FAILURE reading integer." << llendl; |
539 | parse_count = PARSE_FAILURE; | 539 | parse_count = PARSE_FAILURE; |
540 | } | 540 | } |
541 | break; | 541 | break; |
@@ -549,7 +549,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
549 | data = real; | 549 | data = real; |
550 | if(istr.fail()) | 550 | if(istr.fail()) |
551 | { | 551 | { |
552 | llinfos << "STREAM FAILURE reading real." << llendl; | 552 | llwarns << "STREAM FAILURE reading real." << llendl; |
553 | parse_count = PARSE_FAILURE; | 553 | parse_count = PARSE_FAILURE; |
554 | } | 554 | } |
555 | break; | 555 | break; |
@@ -563,7 +563,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
563 | data = id; | 563 | data = id; |
564 | if(istr.fail()) | 564 | if(istr.fail()) |
565 | { | 565 | { |
566 | llinfos << "STREAM FAILURE reading uuid." << llendl; | 566 | llwarns << "STREAM FAILURE reading uuid." << llendl; |
567 | parse_count = PARSE_FAILURE; | 567 | parse_count = PARSE_FAILURE; |
568 | } | 568 | } |
569 | break; | 569 | break; |
@@ -578,7 +578,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
578 | } | 578 | } |
579 | if(istr.fail()) | 579 | if(istr.fail()) |
580 | { | 580 | { |
581 | llinfos << "STREAM FAILURE reading string." << llendl; | 581 | llwarns << "STREAM FAILURE reading string." << llendl; |
582 | parse_count = PARSE_FAILURE; | 582 | parse_count = PARSE_FAILURE; |
583 | } | 583 | } |
584 | break; | 584 | break; |
@@ -600,7 +600,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
600 | } | 600 | } |
601 | if(istr.fail()) | 601 | if(istr.fail()) |
602 | { | 602 | { |
603 | llinfos << "STREAM FAILURE reading link." << llendl; | 603 | llwarns << "STREAM FAILURE reading link." << llendl; |
604 | parse_count = PARSE_FAILURE; | 604 | parse_count = PARSE_FAILURE; |
605 | } | 605 | } |
606 | break; | 606 | break; |
@@ -623,7 +623,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
623 | } | 623 | } |
624 | if(istr.fail()) | 624 | if(istr.fail()) |
625 | { | 625 | { |
626 | llinfos << "STREAM FAILURE reading date." << llendl; | 626 | llwarns << "STREAM FAILURE reading date." << llendl; |
627 | parse_count = PARSE_FAILURE; | 627 | parse_count = PARSE_FAILURE; |
628 | } | 628 | } |
629 | break; | 629 | break; |
@@ -636,14 +636,14 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
636 | } | 636 | } |
637 | if(istr.fail()) | 637 | if(istr.fail()) |
638 | { | 638 | { |
639 | llinfos << "STREAM FAILURE reading data." << llendl; | 639 | llwarns << "STREAM FAILURE reading data." << llendl; |
640 | parse_count = PARSE_FAILURE; | 640 | parse_count = PARSE_FAILURE; |
641 | } | 641 | } |
642 | break; | 642 | break; |
643 | 643 | ||
644 | default: | 644 | default: |
645 | parse_count = PARSE_FAILURE; | 645 | parse_count = PARSE_FAILURE; |
646 | llinfos << "Unrecognized character while parsing: int(" << (int)c | 646 | llwarns << "Unrecognized character while parsing: int(" << (int)c |
647 | << ")" << llendl; | 647 | << ")" << llendl; |
648 | break; | 648 | break; |
649 | } | 649 | } |
@@ -905,7 +905,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
905 | } | 905 | } |
906 | if(istr.fail()) | 906 | if(istr.fail()) |
907 | { | 907 | { |
908 | llinfos << "STREAM FAILURE reading binary map." << llendl; | 908 | llwarns << "STREAM FAILURE reading binary map." << llendl; |
909 | parse_count = PARSE_FAILURE; | 909 | parse_count = PARSE_FAILURE; |
910 | } | 910 | } |
911 | break; | 911 | break; |
@@ -924,7 +924,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
924 | } | 924 | } |
925 | if(istr.fail()) | 925 | if(istr.fail()) |
926 | { | 926 | { |
927 | llinfos << "STREAM FAILURE reading binary array." << llendl; | 927 | llwarns << "STREAM FAILURE reading binary array." << llendl; |
928 | parse_count = PARSE_FAILURE; | 928 | parse_count = PARSE_FAILURE; |
929 | } | 929 | } |
930 | break; | 930 | break; |
@@ -949,7 +949,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
949 | data = (S32)ntohl(value_nbo); | 949 | data = (S32)ntohl(value_nbo); |
950 | if(istr.fail()) | 950 | if(istr.fail()) |
951 | { | 951 | { |
952 | llinfos << "STREAM FAILURE reading binary integer." << llendl; | 952 | llwarns << "STREAM FAILURE reading binary integer." << llendl; |
953 | } | 953 | } |
954 | break; | 954 | break; |
955 | } | 955 | } |
@@ -961,7 +961,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
961 | data = ll_ntohd(real_nbo); | 961 | data = ll_ntohd(real_nbo); |
962 | if(istr.fail()) | 962 | if(istr.fail()) |
963 | { | 963 | { |
964 | llinfos << "STREAM FAILURE reading binary real." << llendl; | 964 | llwarns << "STREAM FAILURE reading binary real." << llendl; |
965 | } | 965 | } |
966 | break; | 966 | break; |
967 | } | 967 | } |
@@ -973,7 +973,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
973 | data = id; | 973 | data = id; |
974 | if(istr.fail()) | 974 | if(istr.fail()) |
975 | { | 975 | { |
976 | llinfos << "STREAM FAILURE reading binary uuid." << llendl; | 976 | llwarns << "STREAM FAILURE reading binary uuid." << llendl; |
977 | } | 977 | } |
978 | break; | 978 | break; |
979 | } | 979 | } |
@@ -994,7 +994,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
994 | } | 994 | } |
995 | if(istr.fail()) | 995 | if(istr.fail()) |
996 | { | 996 | { |
997 | llinfos << "STREAM FAILURE reading binary (notation-style) string." | 997 | llwarns << "STREAM FAILURE reading binary (notation-style) string." |
998 | << llendl; | 998 | << llendl; |
999 | parse_count = PARSE_FAILURE; | 999 | parse_count = PARSE_FAILURE; |
1000 | } | 1000 | } |
@@ -1014,7 +1014,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1014 | } | 1014 | } |
1015 | if(istr.fail()) | 1015 | if(istr.fail()) |
1016 | { | 1016 | { |
1017 | llinfos << "STREAM FAILURE reading binary string." << llendl; | 1017 | llwarns << "STREAM FAILURE reading binary string." << llendl; |
1018 | parse_count = PARSE_FAILURE; | 1018 | parse_count = PARSE_FAILURE; |
1019 | } | 1019 | } |
1020 | break; | 1020 | break; |
@@ -1033,7 +1033,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1033 | } | 1033 | } |
1034 | if(istr.fail()) | 1034 | if(istr.fail()) |
1035 | { | 1035 | { |
1036 | llinfos << "STREAM FAILURE reading binary link." << llendl; | 1036 | llwarns << "STREAM FAILURE reading binary link." << llendl; |
1037 | parse_count = PARSE_FAILURE; | 1037 | parse_count = PARSE_FAILURE; |
1038 | } | 1038 | } |
1039 | break; | 1039 | break; |
@@ -1046,7 +1046,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1046 | data = LLDate(real); | 1046 | data = LLDate(real); |
1047 | if(istr.fail()) | 1047 | if(istr.fail()) |
1048 | { | 1048 | { |
1049 | llinfos << "STREAM FAILURE reading binary date." << llendl; | 1049 | llwarns << "STREAM FAILURE reading binary date." << llendl; |
1050 | parse_count = PARSE_FAILURE; | 1050 | parse_count = PARSE_FAILURE; |
1051 | } | 1051 | } |
1052 | break; | 1052 | break; |
@@ -1075,7 +1075,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1075 | } | 1075 | } |
1076 | if(istr.fail()) | 1076 | if(istr.fail()) |
1077 | { | 1077 | { |
1078 | llinfos << "STREAM FAILURE reading binary." << llendl; | 1078 | llwarns << "STREAM FAILURE reading binary." << llendl; |
1079 | parse_count = PARSE_FAILURE; | 1079 | parse_count = PARSE_FAILURE; |
1080 | } | 1080 | } |
1081 | break; | 1081 | break; |
@@ -1083,7 +1083,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1083 | 1083 | ||
1084 | default: | 1084 | default: |
1085 | parse_count = PARSE_FAILURE; | 1085 | parse_count = PARSE_FAILURE; |
1086 | llinfos << "Unrecognized character while parsing: int(" << (int)c | 1086 | llwarns << "Unrecognized character while parsing: int(" << (int)c |
1087 | << ")" << llendl; | 1087 | << ")" << llendl; |
1088 | break; | 1088 | break; |
1089 | } | 1089 | } |
diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index 33206b4..dab6c1d 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp | |||
@@ -391,6 +391,14 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) | |||
391 | 391 | ||
392 | if (status == XML_STATUS_ERROR) | 392 | if (status == XML_STATUS_ERROR) |
393 | { | 393 | { |
394 | std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser ))); | ||
395 | if ("parsing aborted" != error_string )//end of input | ||
396 | { | ||
397 | S32 line_number = XML_GetCurrentLineNumber( mParser ); | ||
398 | llwarns << "LLXmlTree parse failed. Line " << line_number << ": " | ||
399 | << error_string << llendl; | ||
400 | } | ||
401 | |||
394 | break; | 402 | break; |
395 | } | 403 | } |
396 | } | 404 | } |
@@ -408,7 +416,8 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) | |||
408 | { | 416 | { |
409 | ((char*) buffer)[count ? count - 1 : 0] = '\0'; | 417 | ((char*) buffer)[count ? count - 1 : 0] = '\0'; |
410 | } | 418 | } |
411 | llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; | 419 | |
420 | |||
412 | data = LLSD(); | 421 | data = LLSD(); |
413 | return LLSDParser::PARSE_FAILURE; | 422 | return LLSDParser::PARSE_FAILURE; |
414 | } | 423 | } |
@@ -486,7 +495,13 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data) | |||
486 | if (status == XML_STATUS_ERROR | 495 | if (status == XML_STATUS_ERROR |
487 | && !mGracefullStop) | 496 | && !mGracefullStop) |
488 | { | 497 | { |
489 | llinfos << "LLSDXMLParser::Impl::parseLines: XML_STATUS_ERROR" << llendl; | 498 | std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser ))); |
499 | if ("parsing aborted" != error_string )//end of input | ||
500 | { | ||
501 | S32 line_number = XML_GetCurrentLineNumber( mParser ); | ||
502 | llwarns << "LLXmlTree parse failed. Line " << line_number << ": " | ||
503 | << error_string << llendl; | ||
504 | } | ||
490 | return LLSDParser::PARSE_FAILURE; | 505 | return LLSDParser::PARSE_FAILURE; |
491 | } | 506 | } |
492 | 507 | ||
@@ -552,7 +567,9 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, int len) | |||
552 | XML_Status status = XML_Parse(mParser, buf, len, false); | 567 | XML_Status status = XML_Parse(mParser, buf, len, false); |
553 | if (status == XML_STATUS_ERROR) | 568 | if (status == XML_STATUS_ERROR) |
554 | { | 569 | { |
555 | llinfos << "Unexpected XML parsing error at start" << llendl; | 570 | std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser )) ); |
571 | |||
572 | llwarns << "Unexpected XML parsing error at start: " << error_string << llendl; | ||
556 | } | 573 | } |
557 | } | 574 | } |
558 | } | 575 | } |