Commits

Richo Healey committed b235d1f

Framework a warning for scurvy dogs with invalid credentials

Comments (0)

Files changed (2)

       rescue NoConfigFile
         puts "No config file, create one with twat -a [user|nick]"
         opts.usage
+      rescue InvalidCredentials
+        puts "Invalid credentials, try reauthenticating with"
+        puts "twat -a #{opts[:account]}"
       end
     end
   end

lib/twat/exceptions.rb

   class NoSuchAccount < Exception; end
   class NoConfigFile < Exception; end
   class Usage < Exception; end
+  class InvalidCredentials < Exception; end
 end