Commit 171d6ac0 171d6ac0c3564b1faa523bf0380532ff25ed532c by Sergey Poznyakoff

(mh_whom): Improve diagnostics.

1 parent 77ecb6d7
...@@ -223,9 +223,13 @@ mh_whom (const char *filename, int check) ...@@ -223,9 +223,13 @@ mh_whom (const char *filename, int check)
223 223
224 mh_read_aliases (); 224 mh_read_aliases ();
225 ctx = mh_context_create (filename, 1); 225 ctx = mh_context_create (filename, 1);
226 if (mh_context_read (ctx)) 226 if ((rc = mh_context_read (ctx)))
227 { 227 {
228 mu_error (_("Malformed message")); 228 if (rc == ENOENT)
229 mu_error ("%s: %s", filename, mu_strerror (rc));
230 else
231 mu_error ("%s: %s (%s)", filename, _("Malformed message"),
232 mu_strerror (rc));
229 rc = -1; 233 rc = -1;
230 } 234 }
231 else 235 else
......