lib/munge/system/router.rb in munge-0.12.0 vs lib/munge/system/router.rb in munge-0.13.0
- old
+ new
@@ -11,11 +11,11 @@
when :route
@registries[:route].push(router)
when :filepath
@registries[:filepath].push(router)
else
- raise "invalid router"
+ raise Errors::InvalidRouterError, router.type
end
end
def route(item)
path = route_mapper(item, :route)
@@ -30,10 +30,10 @@
private
def route_mapper(item, method_name, initial_route = nil)
if !item.route && !initial_route
- raise "item `#{item.relpath}` has no route"
+ raise Errors::ItemHasNoRouteError, item.relpath
end
itemish = Itemish.new(item, @processor)
@registries[method_name]