Sha256: 210b88d42fdccd71c7903da09f14ed031799543ddbaed55bc8d730d67b64a204
Contents?: true
Size: 838 Bytes
Versions: 4
Compression:
Stored size: 838 Bytes
Contents
module Chess # This exception will be raised when an invalid short algebraic chess notation # string is passed to the Game#move function. class BadNotationError < StandardError # :nodoc: # Create a new exception. def initialize(notation) super("The notation '#{notation}' is invalid") end end # This exception will be raised when a malformed PGN file is loaded. class InvalidPgnFormatError < StandardError # :nodoc: # Create a new exception. def initialize(filename) super("Invalid PGN file: '#{filename}'") end end # This exception will be raised when an invalid FEN string is used. class InvalidFenFormatError < StandardError # :nodoc: # Create a new exception. def initialize(fen_string) super("Invalid FEN string: '#{fen_string}'") end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
chess-0.1.3 | lib/chess/exceptions.rb |
chess-0.1.2 | lib/chess/exceptions.rb |
chess-0.1.1 | lib/chess/exceptions.rb |
chess-0.1.0 | lib/chess/exceptions.rb |