Oysiyl commited on
Commit
bcb5600
·
1 Parent(s): ed12b85

catch RuntimeError as well

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -208,7 +208,7 @@ def generate_qr_code(prompt: str, text_input: str, input_type: str = "URL", imag
208
  border=border_size,
209
  module_drawer=module_drawer,
210
  )
211
- except gr.Error as e:
212
  error_msg = f"Error generating QR code: {str(e)}\n\nTry with a shorter text or to increase the image size."
213
  raise gr.Error(error_msg) from e
214
 
 
208
  border=border_size,
209
  module_drawer=module_drawer,
210
  )
211
+ except RuntimeError or gr.Error as e:
212
  error_msg = f"Error generating QR code: {str(e)}\n\nTry with a shorter text or to increase the image size."
213
  raise gr.Error(error_msg) from e
214