From f7d5bd46d78af12f42fd9bd7c524eda17ce17dc4 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 24 Apr 2013 15:10:55 +0200 Subject: [PATCH] finddir: Print more useful message in error case --- src/bin/finddir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bin/finddir.c b/src/bin/finddir.c index d578ddde4a..4c8a16eae6 100644 --- a/src/bin/finddir.c +++ b/src/bin/finddir.c @@ -249,9 +249,8 @@ main(int argc, char *argv[]) if (result == B_OK) { printf("%s\n", buffer); } else { - /* else what? */ - /* this can not happen! */ - fprintf(stderr, "Serious internal error; contact support\n"); + fprintf(stderr, "Failed to get directory: %s\n", strerror(result)); + return 1; } }