Commit 15a7d7b
Changed files (1)
lib
lib/del/default_router.rb
@@ -11,7 +11,11 @@ module Del
def route(message)
@routes.each do |route|
if matches = route[:pattern].match(message.text)
- route[:command].call(message, matches)
+ begin
+ route[:command].call(message, matches)
+ rescue StandardError => error
+ Del.logger.error(error)
+ end
end
end
end