13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'bin/milkmaid', line 13
def handle_exceptions
begin
yield
rescue RTM::NoTokenException
puts "Authentication token not found. Run `#{__FILE__} auth start`"
rescue Milkmaid::TaskNotFound
puts "Task ##{params['tasknum'].value} not found. Run `#{__FILE__} task` " +
"to load a list of tasks."
rescue Milkmaid::ListNotFound
puts "List ##{params['listnum'].value} not found. Run `#{__FILE__} list` " +
"to load lists."
rescue Errno::ETIMEDOUT
puts "Unable to connect to the server. Please try again later."
end
end
|