ConfigException

Base exception type thrown by the config parser

Whenever dealing with Exceptions thrown by the config parser, catching this type will allow to optionally format with colors:

try
{
    auto conf = parseConfigFile!Config(cmdln);
    // ...
}
catch (ConfigException exc)
{
    writeln("Parsing the config file failed:");
    writelfln(isOutputATTY() ? "%S" : "%s", exc);
}

Constructors

this
this(string path, string key, Mark position, string file, size_t line)
this(string path, Mark position, string file, size_t line)

Constructor

Members

Functions

formatMessage
void formatMessage(SinkType sink, FormatSpec!char spec)

Hook called by toString to simplify coloring

toString
void toString(void delegate(in char[]) sink)

Overrides Throwable.toString and its sink overload

toString
string toString()
void toString(SinkType sink, FormatSpec!char spec)

Overrides Throwable.toString and its sink overload

Variables

key
string key;

If non-empty, the key under 'path' which triggered the error If empty, the key should be considered part of 'path'

path
string path;

The path at which the key resides

yamlPosition
Mark yamlPosition;

Position at which the error happened

Meta