lib/cfoundry/v2/app.rb in cfoundry-0.3.56 vs lib/cfoundry/v2/app.rb in cfoundry-0.3.57

- old
+ new

@@ -125,11 +125,12 @@ end end alias :urls :uris def uris=(uris) - raise "App#uris= is invalid against V2 APIs. Use add/remove_route." + raise CFoundry::Deprecated, + "App#uris= is invalid against V2 APIs; use add/remove_route" end alias :urls= :uris= def create_routes(*uris) uris.each do |uri| @@ -138,11 +139,13 @@ domain = @client.current_space.domains.find { |d| d.name == domain_name } - raise "Invalid domain '#{domain_name}'" unless domain + unless domain + raise CFoundry::Error, "Invalid domain '#{domain_name}'" + end route = @client.routes.find { |r| r.host == host && r.domain == domain } @@ -294,10 +297,10 @@ # without checking the resource cache. # # Only do this if you know what you're doing. def upload(path, check_resources = true) unless File.exist? path - raise "invalid application path '#{path}'" + raise CFoundry::Error, "Invalid application path '#{path}'" end zipfile = "#{Dir.tmpdir}/#{@guid}.zip" tmpdir = "#{Dir.tmpdir}/.vmc_#{@guid}_files"