lib/tgbot/dsl.rb in tgbot-0.1.1 vs lib/tgbot/dsl.rb in tgbot-0.1.2
- old
+ new
@@ -40,18 +40,20 @@
@procs[:after]&.call update
end
rescue Interrupt
@procs[:finish]&.call
rescue => e
- puts e
- puts e.backtrace
+ puts e.backtrace.unshift(e.to_s).join("\n")
retry
end
end
def method_missing(meth, *args, &blk)
@runner.send(meth, *args, &blk)
end
end
def self.run(token, **opts, &blk)
DSL.new(token, **opts).run(&blk)
+ end
+ def self.new(token, **opts)
+ DSL.new(token, **opts)
end
end