File: INIReaderExampleErrors.cpp

package info (click to toggle)
wlmaker 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,696 kB
  • sloc: ansic: 58,587; xml: 1,424; python: 1,400; cpp: 253; yacc: 118; sh: 73; lex: 70; makefile: 8
file content (18 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Example that demonstrates the ParseErrorMessage() method.

#include <iostream>
#include "../cpp/INIReader.h"

int main()
{
    INIReader reader_file_not_found("/file_that_does_not_exist.ini");
    INIReader reader_parse_error("../tests/name_only_after_error.ini");
    INIReader reader_success("../tests/normal.ini");

    std::cout
        << "reader_file_not_found errmsg: \"" << reader_file_not_found.ParseErrorMessage() << "\"\n"
        << "reader_parse_error errmsg: \"" << reader_parse_error.ParseErrorMessage() << "\"\n"
        << "reader_success errmsg: \"" << reader_success.ParseErrorMessage() << "\"\n";

    return 0;
}