Attempt to read and process the config file at path, print any error
This 'simple' overload of the more detailed parseConfigFile will attempt
to read the file at path, and return a Nullable instance of it.
If an error happens, either because the file isn't readable or
the configuration has an issue, a message will be printed to stderr,
with colors if the output is a TTY, and a null instance will be returned.
The calling code can hence just read a config file via:
int main ()
{
auto configN = parseConfigFileSimple!Config("config.yaml");
if (configN.isNull()) return 1; // Error path
auto config = configN.get();
// Rest of the program ...
}
Attempt to read and process the config file at path, print any error
This 'simple' overload of the more detailed parseConfigFile will attempt to read the file at path, and return a Nullable instance of it. If an error happens, either because the file isn't readable or the configuration has an issue, a message will be printed to stderr, with colors if the output is a TTY, and a null instance will be returned.
The calling code can hence just read a config file via:
An overload accepting CLIArgs args also exists.