lib/usher/route/variable.rb in joshbuddy-usher-0.2.1 vs lib/usher/route/variable.rb in joshbuddy-usher-0.2.2
- old
+ new
@@ -33,10 +33,10 @@
@validator.call(val)
else
@validator === val or raise
end if @validator
rescue Exception => e
- raise ValidationException.new(e, "#{val} does not conform to #{@validator}")
+ raise ValidationException.new("#{val} does not conform to #{@validator}, root cause #{e.inspect}")
end
def ==(o)
o && (o.type == @type && o.name == @name && o.validator == @validator)
end
\ No newline at end of file