• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Clinical-Genomics / cg / 10179980459

31 Jul 2024 12:14PM UTC coverage: 83.284%. First build
10179980459

Pull #3487

github

web-flow
Merge 2a64a106f into eec50e6da
Pull Request #3487: add error handlers pacbio flow

54 of 59 new or added lines in 10 files covered. (91.53%)

16766 of 20131 relevant lines covered (83.28%)

1.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.25
/cg/services/post_processing/error_handler.py
1
"""Module that holds the error handlers for the Post Processing service."""
2

3
import logging
1✔
4
from cg.exc import CgError
1✔
5

6
LOG = logging.getLogger(__name__)
1✔
7

8

9
def handle_post_processing_errors(to_except: tuple, to_raise):
1✔
10
    """Handle errors for the Post processing services."""
11

12
    def error_handling(fn):
1✔
13
        def wrapper(*args, **kwargs):
1✔
14
            try:
1✔
15
                return fn(*args, **kwargs)
1✔
16
            except to_except as error:
1✔
17
                LOG.debug(error)
1✔
18
                raise to_raise(error) from error
1✔
NEW
19
            except Exception as error:
×
NEW
20
                LOG.error(error)
×
NEW
21
                raise CgError(f"{error}") from error
×
22

23
        return wrapper
1✔
24

25
    return error_handling
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc