lib/acfs/errors.rb in acfs-0.43.1 vs lib/acfs/errors.rb in acfs-0.43.2
- old
+ new
@@ -44,14 +44,17 @@
class AmbiguousStubError < Error
attr_reader :stubs, :operation
def initialize(opts = {})
+ require 'pp'
+
@stubs = opts.delete :stubs
@operation = opts.delete :operation
- super opts, 'Ambiguous stubs.'
+ super opts, "Ambiguous stubs for #{operation.action} on #{operation.resource}.\n" +
+ stubs.map {|s| " #{s.opts.pretty_inspect}" }.join
end
end
# Resource not found error raised on a 404 response
#
@@ -95,10 +98,10 @@
attr_reader :type_name
def initialize(opts = {})
@base_class = opts.delete :base_class
@type_name = opts.delete :type_name
- opts[:message] = "Recieved ressource type `#{type_name}` is no subclass of #{base_class}"
+ opts[:message] = "Received resource type `#{type_name}` is no subclass of #{base_class}"
super
end
end
class RealRequestsNotAllowedError < StandardError; end