def error():
    try:
        raise Exception('FAKE EXCEPTION')
    except Exception as e:
        logger.log(u"FAKE ERROR: " + ex(e), logger.ERROR)
        logger.submit_errors()
        raise
Example #2
0
def exception_generator():
    """
    Dummy function to raise a fake exception and log it
    """
    try:
        raise Exception('FAKE EXCEPTION')
    except Exception as error:
        logger.log("FAKE ERROR: " + ex(error), logger.ERROR)  # pylint: disable=no-member
        logger.submit_errors()  # pylint: disable=no-member
        raise
def exception_generator():
    """
    Dummy function to raise a fake exception and log it
    """
    try:
        raise Exception('FAKE EXCEPTION')
    except Exception as error:
        logger.log(u"FAKE ERROR: " + ex(error), logger.ERROR)  # pylint: disable=no-member
        logger.submit_errors()  # pylint: disable=no-member
        raise
Example #4
0
    def submit_errors(self):
        submitter_result, issue_id = logger.submit_errors()
        logger.log(submitter_result, (logger.INFO, logger.WARNING)[issue_id is None])
        submitter_notification = ui.notifications.error if issue_id is None else ui.notifications.message
        submitter_notification(submitter_result)

        return self.redirect('/errorlogs/')
Example #5
0
    def submit_errors(self):
        submitter_result, issue_id = logger.submit_errors()
        logger.log(submitter_result,
                   (logger.INFO, logger.WARNING)[not issue_id])
        submitter_notification = ui.notifications.error if not issue_id else ui.notifications.message
        submitter_notification(submitter_result)

        return self.redirect("/errorlogs/")