W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
exception?jinja2.TemplateError(message=None)
Baseclass for all template errors.
exception?jinja2.UndefinedError(message=None)
Raised if a template tries to operate on?Undefined.
exception?jinja2.TemplateNotFound(name,?message=None)
Raised if a template does not exist.
exception?jinja2.TemplatesNotFound(names=(),?message=None)
Like?TemplateNotFound?but raised if multiple templates are selected. This is a subclass of?TemplateNotFound?exception, so just catching the base exception will catch both.
New in version 2.2.
exception?jinja2.TemplateSyntaxError(message,?lineno,?name=None,filename=None)
Raised to tell the user that there is a problem with the template.
錯誤信息的 utf-8 字節(jié)串。
發(fā)生錯誤的行號。
模板的加載名的 unicode 字符串。
加載的模板的文件名字節(jié)串,以文件系統(tǒng)的編碼(多是 utf-8 , Windows 是 mbcs )。
文件名和錯誤消息是字節(jié)串而不是 unicode 字符串的原因是,在 Python 2.x 中,不對異常和回溯使用 unicode ,編譯器同樣。這會在 Python 3 改變。
exception?jinja2.TemplateAssertionError(message,?lineno,?name=None,filename=None)
Like a template syntax error, but covers cases where something in the template caused an error at compile time that wasn’t necessarily caused by a syntax error. However it’s a direct subclass of?TemplateSyntaxError?and has the same attributes.
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: