DistroPropaganda/proveRuby/eccezzioni.rb
2018-11-24 13:20:20 +01:00

10 lines
333 B
Ruby

file_name = "/home/jops/Projects/DistroPropaganda/proveRuby"
begin
content=load_blog_data(file_name)
rescue BlogDataNotFound
STDERR.puts "File #{file_name} not found"
rescue BlogDataFormatError
STDERR.puts "Invalid blog data in #{file_name}"
rescue Exception
STDERR.puts "General error loading #{file_name} : #{exc.message}"
end