1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
module Semverse
class SemverseError < StandardError; end
class InvalidVersionFormat < SemverseError
attr_reader :version
# @param [#to_s] version
def initialize(version)
@version = version
end
def to_s
"'#{version}' did not contain a valid version string: 'x.y.z' or 'x.y'."
end
end
class InvalidConstraintFormat < SemverseError
attr_reader :constraint
# @param [#to_s] constraint
def initialize(constraint)
@constraint = constraint
end
def to_s
"'#{constraint}' did not contain a valid operator or a valid version string."
end
end
class NoSolutionError < SemverseError; end
end
|