Skip to content

Commit

Permalink
Allow exceptions that contain error information.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyisfor committed Oct 26, 2012
1 parent f2368c3 commit c997f00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/cjdns-lib/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ def parse_configfile(conf = [ '/etc/cjdns/cjdroute.conf', '/etc/cjdroute.conf',
conf.each do |file|
next unless File.exists? file

begin
# begin
admin = JSON.parse(File.open(file).read)['admin']
rescue JSON::ParserError
raise "failed to parse configuration file. does '#{file}' contain valid json?"
end
# rescue JSON::ParserError
# raise "failed to parse configuration file. does '#{file}' contain valid json?"
# end

host, port = admin['bind'].split(':')
return { 'host' => host, 'port' => port, 'password' => admin['password'] }
Expand Down

0 comments on commit c997f00

Please sign in to comment.