lib/nydp/builtin.rb in nydp-0.0.6 vs lib/nydp/builtin.rb in nydp-0.0.7

- old
+ new

@@ -1,16 +1,13 @@ require 'nydp' +require 'nydp/error' module Nydp::Builtin module Base - def indent_text txt - txt.split(/\n/).map { |line| " #{line}"}.join("\n") - end - def invoke vm, args builtin_invoke vm, args rescue Exception => e - new_msg = "Invoking #{self.class.name}\nwith args #{args}\nraised\n#{indent_text e.message}" + new_msg = "Invoking #{self.class.name}\nwith args #{args}\nraised\n#{Nydp.indent_text e.message}" raise $!, new_msg, $!.backtrace end end def inspect ; self.class.name ; end