summaryrefslogtreecommitdiff
path: root/examples/error.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/error.cpp')
-rw-r--r--examples/error.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/error.cpp b/examples/error.cpp
new file mode 100644
index 0000000..54bb17d
--- /dev/null
+++ b/examples/error.cpp
@@ -0,0 +1,20 @@
+#include <file.hpp>
+#include <xift.hpp>
+
+
+int main()
+{
+ XiftFile exporter(stdout);
+ Xift xift(exporter);
+
+ xift.permitted.Tag("p").Attribute("class");
+
+ xift.PutFile("error.html");
+
+ if (!xift.End()) {
+ printf("Error on %d line, %d column:\n%s",
+ xift.ErrorLine(), xift.ErrorColumn(), xift.Error());
+ }
+
+ return 0;
+}