I have a statement that fails:
result = service.load_data()
Now the following suppresses the error and I can then check for nil
result = service.load_data() rescue nil
But when I do the following the initial error is thrown right up to the UI and I don't get the details
of the exception.
begin
result = service.load_data()
rescue => details
logger.fatal "Failed to load the data: #{details}"
end
I am sure there is a silly detail I must be missing but I can't seem to spot the problem here. So why isn't the rescue
block invoked?
Update: The error I got was this:
getaddrinfo: nodename nor servname provided, or not known