263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
# File 'lib/fig.rb', line 263
def run_with_exception_handling(argv)
begin
return_code = run_fig(argv)
return return_code
rescue URLAccessError => error
urls = exception.urls.join(', ')
$stderr.puts "Access to #{urls} in #{exception.package}/#{exception.version} not allowed."
return 1
rescue UserInputError => error
log_error_message(error)
return 1
rescue OptionParser::InvalidOption => error
$stderr.puts error.to_s
$stderr.puts USAGE
return 1
rescue RepositoryError => error
log_error_message(error)
return 1
end
end
|