error.rb 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. # Copyright 2024 Henrique Paone
  2. #
  3. # This file is part of Tanki.
  4. #
  5. # Tanki is free software: you can redistribute it and/or modify it under the
  6. # terms of the GNU General Public License as published by the Free Software
  7. # Foundation, either version 3 of the License, or (at your option) any later
  8. # version.
  9. #
  10. # Tanki is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  12. # PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License along with
  15. # Tanki. If not, see <https://www.gnu.org/licenses/>.
  16. module Error
  17. Err_msgs = {
  18. parse: "Error parsing card's contents %{file}",
  19. t_and_r: '-t and -r not allowed together',
  20. missing_deck: 'No decks specified for -d',
  21. missing_card: 'No cards specified for -c' ,
  22. no_cards: 'No cards found for passed arguments',
  23. bad_date: 'Bad LastReview value in card %{file}, run with -c to fix',
  24. bad_stage: 'Bad Stage value in card %{file}, run with -c to fix',
  25. unknown_arg: 'Unrecgonized argument \'%{arg}\''
  26. }
  27. class ParsingError < StandardError ; end
  28. class BadArgument < StandardError ; end
  29. class BadValue < StandardError ; end
  30. end