hutchresearch / latex2speech

TeX2Speech is an application that turns LaTeX documents into spoken audio.
https://tex2speech-website.vercel.app/
MIT License
12 stars 5 forks source link

Add Page - Web Application #90

Closed willsower closed 3 years ago

willsower commented 3 years ago

If something doesn't render or our program errors out, we should direct the user to a page saying their file couldn't be rendered and a link letting them go back to the home page.

willsower commented 3 years ago

In the future, this should be done in a different way. For example, currently, if we run a file, and it errors. We have the block inside a try/catch. If we catch the error, return the error.html page. However, an edge case is, if a user uploads 10 documents, and only 1 document fails, we should still direct the user to the download page, but explain file x could not be rendered.

willsower commented 3 years ago

In application.py

    # Render
    file_links = start_polly(file_holder, bib_holder)

    # try:
    #     # Render
    #     file_links = start_polly(file_holder, bib_holder)
    # except EOFError as e:
    #     return render_template('error.html')

Will add more exceptions (I have a list from my debug.py file on school machines). Need to update the design a little. Currently have this commented out since Connor and I are debugging the files (with this page we can't see the errors) but this page is perfect for the end user.