Skip to content

Commit

Permalink
Nicer error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankshearar committed Nov 21, 2011
1 parent c0fce5e commit 3f9df02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/peano/peano.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def self.from_i(integer)
when 0 then Zero.new
when 1..MAX_INT then Succ.new(from_i(integer - 1))
else
raise "Peano arithmetic only defined over the range [0, #{MAX_INT.to_s}]"
raise "Peano arithmetic only defined over the range [0, #{MAX_INT.to_s}]. You gave #{integer.inspect}."
end
end

Expand Down

0 comments on commit 3f9df02

Please sign in to comment.