summaryrefslogtreecommitdiff
path: root/examples/error.cpp
blob: 72c5bfe967b232903f428160e8f31c0ae9d6f4a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <file.hpp>
#include <xift.hpp>


int main()
{
    XiftFile exporter(stdout);
    Xift     xift(exporter);

    xift.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_message(xift.GetError()));
    }

    return 0;
}