aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-05-10 18:54:25 -0700
committerBoris Kolpackov <boris@codesynthesis.com>2014-05-10 18:54:25 -0700
commite28bfc09f230ed00e94a79efaa6fafd0d07eaf12 (patch)
tree144ad19c2aa30382cead7856751aedff246c0176
parentfbdab3ec236aeed8d8e31535d998df556dd54943 (diff)
Clarify stream exceptions and parser/serializer behavior
-rw-r--r--xml/parser.hxx7
-rw-r--r--xml/serializer.hxx12
2 files changed, 12 insertions, 7 deletions
diff --git a/xml/parser.hxx b/xml/parser.hxx
index 1d45e8c..6f90522 100644
--- a/xml/parser.hxx
+++ b/xml/parser.hxx
@@ -99,8 +99,11 @@ namespace xml
receive_attributes_map;
// Parse std::istream. Input name is used in diagnostics to identify
- // the document being parsed. std::ios_base::failure exception is
- // used to report io errors (badbit and failbit).
+ // the document being parsed.
+ //
+ // If stream exceptions are enabled then std::ios_base::failure
+ // exception is used to report io errors (badbit and failbit).
+ // Otherwise, those are reported as the parsing exception.
//
parser (std::istream&,
const std::string& input_name,
diff --git a/xml/serializer.hxx b/xml/serializer.hxx
index 376eeb1..4f57e48 100644
--- a/xml/serializer.hxx
+++ b/xml/serializer.hxx
@@ -58,11 +58,13 @@ namespace xml
typedef xml::qname qname_type;
// Serialize to std::ostream. Output name is used in diagnostics to
- // identify the document being serialized. std::ios_base::failure
- // exception is used to report io errors (badbit and failbit). The
- // indentation argument specifies the number of indentation spaces
- // that should be used for pretty-printing. If 0 is passed, no
- // pretty-printing is performed.
+ // identify the document being serialized. The indentation argument
+ // specifies the number of indentation spaces that should be used for
+ // pretty-printing. If 0 is passed, no pretty-printing is performed.
+ //
+ // If stream exceptions are enabled then std::ios_base::failure
+ // exception is used to report io errors (badbit and failbit).
+ // Otherwise, those are reported as the serialization exception.
//
serializer (std::ostream&,
const std::string& output_name,