flask之abort函数与自定义异常处理(7)

abort函数

from flask import abort

自定义异常处理

@app.errorhandler(404)
def error(e):
    return '您请求的页面不存在了,请确认后再次访问!%s'%e

猜你喜欢

转载自www.cnblogs.com/lirunsheng/p/10996100.html
今日推荐