Skip to content

Commit

Permalink
better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Sep 15, 2018
1 parent 3b59901 commit ed1ad4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/budy/bots/omni_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
__license__ = "Apache License, Version 2.0"
""" The license for the module """

import traceback

import appier

import budy
Expand Down Expand Up @@ -236,6 +238,8 @@ def sync_product_safe(self, merchandise, *args, **kwargs):
self.logger.warn(
"Problem syncing product %d - %s ..." % (object_id, exception)
)
lines = traceback.format_exc().splitlines()
for line in lines: self.logger.info(line)

def sync_product(
self,
Expand Down Expand Up @@ -322,6 +326,8 @@ def sync_sub_product_safe(self, merchandise, *args, **kwargs):
self.logger.warn(
"Problem syncing sub product %d - %s ..." % (object_id, exception)
)
lines = traceback.format_exc().splitlines()
for line in lines: self.logger.info(line)

def sync_sub_product(
self,
Expand Down

0 comments on commit ed1ad4c

Please sign in to comment.