From: Leslie Viljoen Date: 2010-10-22T03:29:57+09:00 Subject: Re: Erb location of exception in template On Thu, Oct 21, 2010 at 6:15 PM, Leslie Viljoen wrote: > Hiya! > > Does anyone know how I can find the location in an Erb template file > of a line that caused an exception? > > The result of calling erb.result(binding) in build.rb looks like this: > > ./dgp_api.rb:199:in `type': ArgumentError (ArgumentError) >        from (erb):285:in `interpret' >        from (erb):285:in `each' >        from (erb):285:in `interpret' >        from build.rb:26:in `interpret' >        from build.rb:41 > > > I want to know which template line caused the exception in dgp_api.rb. > If this can't be done with erb, can it be done with eruby or erubis? Ah, never mind, the 285 is the line number in the template!