summaryrefslogtreecommitdiff
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
authorDaniel Niknam <mhmd.niknam@gmail.com>2021-08-08 19:40:05 +1000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit34e073c0ca4a7bb0c7e07df883babeaafb03b438 (patch)
tree3594d001c815f4d79924af6f6643468982736517 /lib/rubygems.rb
parent7d859489e181f00b9007e8e6f3d6f17a2b0e8827 (diff)
[rubygems/rubygems] Reword the message
For errors that could happened while loading `rubygems/defaults/operating_system` https://github.com/rubygems/rubygems/commit/6e1e2141f8
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index e750277dd3..9b563f21ee 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1333,7 +1333,12 @@ begin
rescue LoadError
# Ignored
rescue Exception => e
- raise e.class, "#{e.message}\nThis is not expected so please report this issue to your OS support and ask for help."
+ msg = "#{e.message}\n" \
+ "Loading the rubygems/defaults/operating_system.rb file caused an error. " \
+ "This file is owned by your OS, not by rubygems upstream. " \
+ "Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \
+ "the problem and ask for help."
+ raise e.class, msg
end
begin