Skip to content

Commit

Permalink
chore: Improve error catching (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnu-s authored Mar 11, 2024
1 parent 240f4de commit 7ab18e3
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions exodus/exodus/core/apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,20 @@ def start_static_analysis(params):

change_description(request, _('List embedded classes: success'))

# APK
shasum = static_analysis.get_sha256()

# Application
handle = static_analysis.get_package()
version = static_analysis.get_version()
version_code = static_analysis.get_version_code()
app_name = static_analysis.get_app_name()
try:
# APK
shasum = static_analysis.get_sha256()

# Application
handle = static_analysis.get_package()
version = static_analysis.get_version()
version_code = static_analysis.get_version_code()
app_name = static_analysis.get_app_name()
except Exception as e:
logging.info(e)
msg = _('Unable to create the analysis report')
save_error(storage_helper, params, request, msg)
return EXIT_CODE_CREATE_REPORT_ERROR

if not version or not version_code or not app_name or \
len(version) > 50 or len(version_code) > 100 or len(app_name) > 200:
Expand Down

0 comments on commit 7ab18e3

Please sign in to comment.