lib/gamebox/class_finder.rb in gamebox-0.1.1 vs lib/gamebox/class_finder.rb in gamebox-0.2.1

- old
+ new

@@ -5,20 +5,24 @@ klass = nil klass_name = Inflector.camelize(name) begin klass = Object.const_get(klass_name) - rescue NameError + rescue NameError => ex # not there yet + log(:warn, ex) begin require "#{name}" rescue LoadError => ex # maybe its included somewhere else + log(:warn, ex) ensure begin klass = Object.const_get(klass_name) - rescue + rescue Exception => ex # leave this alone.. maybe there isnt a NameView + log(:warn, ex) + end end end klass