]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/utils.rb
Some error handling cleanup
[user/henk/code/ruby/rbot.git] / lib / rbot / utils.rb
index a1a8c4843670872516755c1d7fd6278458eadd11..75277c514668aca6838088098e48211c500128ac 100644 (file)
@@ -33,7 +33,7 @@ module Irc
             $stderr = $stdout
             exec(command, *args)
           rescue Exception => e
-            puts "exec of #{command} led to exception: #{e}"
+            puts "exec of #{command} led to exception: #{e.inspect}"
             Kernel::exit! 0
           end
           puts "exec of #{command} failed"
@@ -75,7 +75,7 @@ module Irc
         }
       rescue => e
         # cheesy for now
-        $stderr.puts "Utils.http_get exception: #{e}, while trying to get #{uristr}"
+        error "Utils.http_get exception: #{e.inspect}, while trying to get #{uristr}"
         return nil
       end
     end