exception.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env python3
  2. # -*- coding: UTF-8 -*-
  3. #
  4. # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
  5. # Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. """
  20. mmgen.exception: Exception classes for the MMGen suite
  21. """
  22. # 1: no hl, message only
  23. class UserNonConfirmation(Exception): mmcode = 1
  24. # 2: yellow hl, message only
  25. class UnrecognizedTokenSymbol(Exception): mmcode = 2
  26. class TokenNotInBlockchain(Exception): mmcode = 2
  27. # 3: yellow hl, 'MMGen Error' + exception + message
  28. class RPCFailure(Exception): mmcode = 3
  29. class BadTxSizeEstimate(Exception): mmcode = 3
  30. # 4: red hl, 'MMGen Fatal Error' + exception + message
  31. class BadMMGenTxID(Exception): mmcode = 4
  32. class IllegalWitnessFlagValue(Exception): mmcode = 4
  33. class WitnessSizeMismatch(Exception): mmcode = 4
  34. class TxHexMismatch(Exception): mmcode = 4