From cc454515dcedea6e7d8ddb26719aa31c8048a32f Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 10 May 2021 12:35:10 +0200 Subject: [PATCH] Proper exception handling --- extra/xapian_indexer.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extra/xapian_indexer.rb b/extra/xapian_indexer.rb index 7c503db1..57566da9 100644 --- a/extra/xapian_indexer.rb +++ b/extra/xapian_indexer.rb @@ -109,9 +109,8 @@ log "Trying to load Redmine environment <<#{$environment}>>..." begin require $environment -rescue LoadError - log "Redmine #{$environment} cannot be loaded!! Be sure the redmine installation directory is correct!", true - log 'Edit script and correct path', true +rescue LoadError => e + log e.message, true exit 1 end