aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2018-05-04 08:32:06 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@mgm-sp.com>2018-05-04 08:32:06 +0200
commitfa661ef87b345d8039a3d973b00f08c2dd60acb6 (patch)
tree7d7d121e76cfdc6366651dab5df83604c8a89140
parent59894a8284ad4fe70d174f00aada3e0c8888bfed (diff)
more debug info in check.cgi
-rwxr-xr-xcheck.cgi33
1 files changed, 24 insertions, 9 deletions
diff --git a/check.cgi b/check.cgi
index fcf86cd..af4bd60 100755
--- a/check.cgi
+++ b/check.cgi
@@ -25,6 +25,19 @@ if __FILE__ == $0
puts "Content-type: text/plain\n"
puts
+ def print_problems(problems)
+ puts "Some problem occured:"
+ print " - "
+ puts problems.collect{|a|
+ a.join("\n ")
+ }.join("\n - ")
+ end
+ def system_info
+ puts "Some System Info:"
+ puts "Ruby Version: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
+ puts "Environment:"
+ pp ENV
+ end
problems = []
hints = []
@@ -73,9 +86,14 @@ else
end
rescue Exception => e
- puts "Some problem occured. Please contact the developer:"
- pp e
- puts e.backtrace.join("\n")
+ if problems.empty?
+ puts "Some problem occured. Please contact the developer:"
+ pp e
+ puts e.backtrace.join("\n")
+ else
+ print_problems(problems)
+ end
+ system_info
else
if problems.empty?
puts "Your environment seems to be installed correctly!"
@@ -83,15 +101,12 @@ else
print "Some hints are following:\n - "
puts hints.join("\n - ")
end
-
else
- puts "Some problem occured:"
- print " - "
- puts problems.collect{|a|
- a.join("\n ")
- }.join("\n - ")
+ print_problems(problems)
+ system_info
end
end
+
#4. You have to build a .mo file from the .po file in order to use the
#localization. Type:
#make