error_404=True#If no url is found throw a 404, the problem is, if I throw at this point a 404 it will be catched by the try, catch block.
error_404=True#If no url is found throw a 404. If you throw a error in a try / catch block it will be catched by this, so set a variable to true and throw the error later
exceptExceptionase:#If there happens an error, print the exception to the console and throw a 500 error
print(e)
abort(500)
print(e)#Print a debug Message to the console
abort(500)#Throw a 500 error. This means internal Server error.
ifnoterror_404:#If there was no 404 error before, redirect the user. If not throw a 404 error