summaryrefslogtreecommitdiff
path: root/slicer/xml
diff options
context:
space:
mode:
Diffstat (limited to 'slicer/xml')
-rw-r--r--slicer/xml/serializer.cpp7
-rw-r--r--slicer/xml/xmlExceptions.ice1
2 files changed, 8 insertions, 0 deletions
diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp
index f83151e..654793c 100644
--- a/slicer/xml/serializer.cpp
+++ b/slicer/xml/serializer.cpp
@@ -8,6 +8,7 @@
#include <boost/intrusive_ptr.hpp>
#include <stdexcept>
#include <glibmm/ustring.h>
+#include <boost/format.hpp>
NAMEDFACTORY(".xml", Slicer::XmlFileSerializer, Slicer::FileSerializerFactory);
NAMEDFACTORY(".xml", Slicer::XmlFileDeserializer, Slicer::FileDeserializerFactory);
@@ -354,5 +355,11 @@ namespace Slicer {
doc = new xmlpp::Document();
modelRoot->OnEachChild(boost::bind(&XmlSerializer::ModelTreeIterateRoot, doc, _1, _2));
}
+
+ void BadBooleanValue::ice_print(std::ostream & s) const
+ {
+ static boost::format f("Bad boolean value [%s]");
+ s << f % text;
+ }
}
diff --git a/slicer/xml/xmlExceptions.ice b/slicer/xml/xmlExceptions.ice
index e03fbe7..94dee30 100644
--- a/slicer/xml/xmlExceptions.ice
+++ b/slicer/xml/xmlExceptions.ice
@@ -4,6 +4,7 @@
#include <common.ice>
module Slicer {
+ ["cpp:ice_print"]
exception BadBooleanValue extends DeserializerError {
string text;
};