Errors detected in .deepsource.toml
.
37 version.slug,
38 )
39 doc_obj.update(queryset.iterator())
40 except Exception: 41 log.exception('Unable to index a subset of files. Continuing.')
42
43
76 if build_id:
77 documents = documents.exclude('term', build=build_id)
78 documents.delete()
79 except Exception: 80 log.exception('Unable to delete a subset of files. Continuing.')
81
82
68 try:
69 # This is a common case that we should be handling a better way
70 doc_obj.update(queryset.iterator(), action='delete')
71 except Exception: 72 log.warning('Unable to delete a subset of files. Continuing.', exc_info=True)
73
74
523 index_data = self._process_index_file(file_path, page=page)
524 if index_data:
525 return index_data
526 except Exception:527 log.warning(
528 'Unhandled exception during search processing file: %s',
529 page,
480 content = self._get_page_content(page)
481 if content:
482 return self._process_content(page, content)
483 except Exception as e:484 log.info('Failed to index page %s, %s', page, str(e))
485 return {
486 'path': page,
If the except block catches a very general exception, it is likely to catch any unrelated errors too. Try to be more explicit about which exception(s) you're trying to catch.
If you need to catch every other exception, then mark it as intentional by
adding a # skipcq
comment.
try:
x = a / b
except Exception:
x = a / (b + 1)
try:
line = input('Enter numbers:')
numbers = [int(i) for i in line.split()]
except BaseException:
print('Only use numbers for the input')
try:
x = a / b
except ZeroDivisionError:
x = a / (b + 1)
try:
event_loop.run()
except Exception as exc: # skipcq: PYL-W0703 - Loop can sometimes crash.
sentry.report(exc)
try:
line = input('Enter numbers:')
numbers = [int(i) for i in line.split()]
except ValueError:
print('Only use numbers for the input')