Conditions | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | from raven.processors import Processor |
||
11 | def process(self, data, **kwargs): |
||
12 | data = super(RelativePathProcessor, self).process(data, **kwargs) |
||
13 | |||
14 | try: |
||
15 | extra = data.get('extra', {}) |
||
16 | |||
17 | self.to_relative(extra, 'pathname') |
||
18 | self.to_relative(extra.get('sys.argv', [])) |
||
19 | except Exception: |
||
|
|||
20 | log.warn('Exception raised in RelativePathProcessor.process()', exc_info=True) |
||
21 | |||
22 | return data |
||
23 | |||
58 |
Generally, you would want to handle very specific errors in the exception handler. This ensure that you do not hide other types of errors which should be fixed.
So, unless you specifically plan to handle any error, consider adding a more specific exception.