summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdserialize.h
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2013-03-05 22:05:22 -0800
committerDon Kjer <don@lindenlab.com>2013-03-05 22:05:22 -0800
commit54cdc322b8f2bd35b289cacf3493622e7cc51194 (patch)
tree4f686cdfbaaf8819dfb1b015a1c8388ea1f59eac /indra/llcommon/llsdserialize.h
parent9a0c52a247ecbd79f5f872ceb97a6be3e0499bea (diff)
Fixing issues with not detecting when LLSD XML parsing fails. Changing most http error handlers to understand LLSD error responses. Fleshing out most http error handler message spam.
Diffstat (limited to 'indra/llcommon/llsdserialize.h')
-rw-r--r--indra/llcommon/llsdserialize.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index 86e3fc864c..e7a5507385 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -300,7 +300,7 @@ public:
/**
* @brief Constructor
*/
- LLSDXMLParser();
+ LLSDXMLParser(bool emit_errors=true);
protected:
/**
@@ -747,25 +747,25 @@ public:
return f->format(sd, str, LLSDFormatter::OPTIONS_PRETTY);
}
- static S32 fromXMLEmbedded(LLSD& sd, std::istream& str)
+ static S32 fromXMLEmbedded(LLSD& sd, std::istream& str, bool emit_errors=true)
{
// no need for max_bytes since xml formatting is not
// subvertable by bad sizes.
- LLPointer<LLSDXMLParser> p = new LLSDXMLParser;
+ LLPointer<LLSDXMLParser> p = new LLSDXMLParser(emit_errors);
return p->parse(str, sd, LLSDSerialize::SIZE_UNLIMITED);
}
// Line oriented parser, 30% faster than fromXML(), but can
// only be used when you know you have the complete XML
// document available in the stream.
- static S32 fromXMLDocument(LLSD& sd, std::istream& str)
+ static S32 fromXMLDocument(LLSD& sd, std::istream& str, bool emit_errors=true)
{
- LLPointer<LLSDXMLParser> p = new LLSDXMLParser();
+ LLPointer<LLSDXMLParser> p = new LLSDXMLParser(emit_errors);
return p->parseLines(str, sd);
}
- static S32 fromXML(LLSD& sd, std::istream& str)
+ static S32 fromXML(LLSD& sd, std::istream& str, bool emit_errors=true)
{
- return fromXMLEmbedded(sd, str);
-// return fromXMLDocument(sd, str);
+ return fromXMLEmbedded(sd, str, emit_errors);
+// return fromXMLDocument(sd, str, emit_errors);
}
/*