grapplerulrich commited on
Commit
35d7624
1 Parent(s): 0fbacc4

Show error if exception for looping search results

Browse files
Files changed (1) hide show
  1. google-search/app.py +5 -2
google-search/app.py CHANGED
@@ -21,8 +21,11 @@ def main():
21
  cx='05048cc2df6134a06',
22
  ).execute()
23
 
24
- for item in results['items']:
25
- st.write(item['link'])
 
 
 
26
 
27
  if __name__ == '__main__':
28
  main()
 
21
  cx='05048cc2df6134a06',
22
  ).execute()
23
 
24
+ try:
25
+ for item in results['items']:
26
+ st.write(item['link'])
27
+ except Exception as e:
28
+ st.exception(e)
29
 
30
  if __name__ == '__main__':
31
  main()