Commit 15a7d7b

mo <mo.khan@gmail.com>
2018-05-10 04:28:20
rescue errors in router.
1 parent 0ec8495
Changed files (1)
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