Commit 8ea1f624 authored by sigmunau's avatar sigmunau
Browse files

vlm.c: Print an error message about what went wrong during vlm-conf loading

parent 3bbb13a9
...@@ -1947,6 +1947,7 @@ static vlm_message_t *vlm_Help( vlm_t *vlm, char *psz_filter ) ...@@ -1947,6 +1947,7 @@ static vlm_message_t *vlm_Help( vlm_t *vlm, char *psz_filter )
static int Load( vlm_t *vlm, char *file ) static int Load( vlm_t *vlm, char *file )
{ {
char *pf = file; char *pf = file;
int i_line = 1;
while( *pf != '\0' ) while( *pf != '\0' )
{ {
...@@ -1967,12 +1968,19 @@ static int Load( vlm_t *vlm, char *file ) ...@@ -1967,12 +1968,19 @@ static int Load( vlm_t *vlm, char *file )
if( *pf && ExecuteCommand( vlm, pf, &message ) ) if( *pf && ExecuteCommand( vlm, pf, &message ) )
{ {
if( message ) free( message ); if( message )
{
if( message->psz_value )
msg_Err( vlm, "Load error on line %d: %s: %s",
i_line, message->psz_name, message->psz_value );
free( message );
}
return 1; return 1;
} }
if( message ) free( message ); if( message ) free( message );
pf += i_end; pf += i_end;
i_line++;
} }
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment