Skip to content

Commit 192484c

Browse files
committed
Making a few syntax changes, adding a Chef::Exception::Route error
1 parent 2491e45 commit 192484c

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

chef/lib/chef/exceptions.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class Exec < RuntimeError; end
2121
class FileNotFound < RuntimeError; end
2222
class Package < RuntimeError; end
2323
class Service < RuntimeError; end
24+
class Route < RuntimeError; end
2425
class SearchIndex < RuntimeError; end
2526
class Override < RuntimeError; end
2627
class UnsupportedAction < RuntimeError; end

chef/lib/chef/provider/route.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_current_resource
4747
end
4848

4949
unless status.exitstatus == 0
50-
raise Chef::Exception::Package, "route failed - #{status.inspect}!"
50+
raise Chef::Exception::Route, "route failed - #{status.inspect}!"
5151
end
5252

5353
@current_resource
@@ -71,7 +71,7 @@ def action_add
7171
)
7272
@new_resource.updated = true
7373
else
74-
Chef::Log.debug("Route #{@current_resource.target} already exists")
74+
Chef::Log.debug("Route #{@current_resource} already exists")
7575
end
7676
end
7777

@@ -89,7 +89,7 @@ def action_delete
8989
)
9090
@new_resource.updated = true
9191
else
92-
Chef::Log.debug("Route #{@current_resource.target} does not exist")
92+
Chef::Log.debug("Route #{@current_resource} does not exist")
9393
end
9494
end
9595
end

chef/lib/chef/resource/route.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def route_type(arg=nil)
8080
set_or_return(
8181
:route_type,
8282
real_arg,
83-
:equal_to => [ :host, :net]
83+
:equal_to => [ :host, :net ]
8484
)
8585
end
8686
end

0 commit comments

Comments
 (0)