Skip to content

Commit f5de249

Browse files
committed
Improved error messages in configuration.
1 parent d244610 commit f5de249

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

source/configuration/source/configuration.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ int configuration_initialize(const char *reader, const char *path, void *allocat
8686

8787
if (global == NULL)
8888
{
89-
log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration global scope map creation");
89+
log_write("metacall", LOG_LEVEL_ERROR, "MetaCall could not find the global configuration, "
90+
"either use a relative path configuration '" CONFIGURATION_DEFAULT_PATH "' or define the environment "
91+
"variable '" CONFIGURATION_PATH "'");
9092

9193
configuration_destroy();
9294

source/configuration/source/configuration_object.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ char *configuration_object_read(const char *path)
7777

7878
if (file == NULL)
7979
{
80-
log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration file path (%s)", path);
81-
8280
return NULL;
8381
}
8482

@@ -136,8 +134,6 @@ configuration configuration_object_initialize(const char *name, const char *path
136134

137135
if (config->source == NULL)
138136
{
139-
log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration file path (%s)", path);
140-
141137
free(config);
142138

143139
return NULL;

0 commit comments

Comments
 (0)