PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: exceptions.py Size: 4.32 KB
//lib/python3.6/site-packages/jinja2/exceptions.py

# -*- coding: utf-8 -*-
"""
    jinja2.exceptions
    ~~~~~~~~~~~~~~~~~

    Jinja exceptions.

    :copyright: (c) 2017 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
"""
from jinja2._compat import imap, text_type, PY2, implements_to_string


class TemplateError(Exception):
    """Baseclass for all template errors."""

    if PY2:
        def __init__(self, message=None):
            if message is not None:
                message = text_type(message).encode('utf-8')
            Exception.__init__(self, message)

        @property
        def message(self):
            if self.args:
                message = self.args[0]
                if message is not None:
                    return message.decode('utf-8', 'replace')

        def __unicode__(self):
            return self.message or u''
    else:
        def __init__(self, message=None):
            Exception.__init__(self, message)

        @property
        def message(self):
            if self.args:
                message = self.args[0]
                if message is not None:
                    return message


@implements_to_string
class TemplateNotFound(IOError, LookupError, TemplateError):
    """Raised if a template does not exist."""

    # looks weird, but removes the warning descriptor that just
    # bogusly warns us about message being deprecated
    message = None

    def __init__(self, name, message=None):
        IOError.__init__(self)
        if message is None:
            message = name
        self.message = message
        self.name = name
        self.templates = [name]

    def __str__(self):
        return self.message


class TemplatesNotFound(TemplateNotFound):
    """Like :class:`TemplateNotFound` but raised if multiple templates
    are selected.  This is a subclass of :class:`TemplateNotFound`
    exception, so just catching the base exception will catch both.

    .. versionadded:: 2.2
    """

    def __init__(self, names=(), message=None):
        if message is None:
            message = u'none of the templates given were found: ' + \
                      u', '.join(imap(text_type, names))
        TemplateNotFound.__init__(self, names and names[-1] or None, message)
        self.templates = list(names)


@implements_to_string
class TemplateSyntaxError(TemplateError):
    """Raised to tell the user that there is a problem with the template."""

    def __init__(self, message, lineno, name=None, filename=None):
        TemplateError.__init__(self, message)
        self.lineno = lineno
        self.name = name
        self.filename = filename
        self.source = None

        # this is set to True if the debug.translate_syntax_error
        # function translated the syntax error into a new traceback
        self.translated = False

    def __str__(self):
        # for translated errors we only return the message
        if self.translated:
            return self.message

        # otherwise attach some stuff
        location = 'line %d' % self.lineno
        name = self.filename or self.name
        if name:
            location = 'File "%s", %s' % (name, location)
        lines = [self.message, '  ' + location]

        # if the source is set, add the line to the output
        if self.source is not None:
            try:
                line = self.source.splitlines()[self.lineno - 1]
            except IndexError:
                line = None
            if line:
                lines.append('    ' + line.strip())

        return u'\n'.join(lines)


class TemplateAssertionError(TemplateSyntaxError):
    """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
    :exc:`TemplateSyntaxError` and has the same attributes.
    """


class TemplateRuntimeError(TemplateError):
    """A generic runtime error in the template engine.  Under some situations
    Jinja may raise this exception.
    """


class UndefinedError(TemplateRuntimeError):
    """Raised if a template tries to operate on :class:`Undefined`."""


class SecurityError(TemplateRuntimeError):
    """Raised if a template tries to do something insecure if the
    sandbox is enabled.
    """


class FilterArgumentError(TemplateRuntimeError):
    """This error is raised if a filter was called with inappropriate
    arguments
    """

Directory Contents

Dirs: 1 × Files: 27

Name Size Perms Modified Actions
- drwxr-xr-x 2025-04-06 18:04:22
Edit Download
4.05 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
7.69 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
12.49 KB lrw-r--r-- 2019-03-19 19:49:57
Edit Download
63.85 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
1.59 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
11.76 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
1.37 KB lrw-r--r-- 2019-03-19 19:49:57
Edit Download
49.66 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
4.32 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
23.93 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
36.27 KB lrw-r--r-- 2025-03-31 07:43:47
Edit Download
8.98 KB lrw-r--r-- 2019-03-19 19:49:57
Edit Download
27.89 KB lrw-r--r-- 2019-03-19 19:49:57
Edit Download
16.97 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
4.24 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
7.14 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
30.13 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
1.68 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
35.03 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
27.10 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
17.08 KB lrw-r--r-- 2025-03-31 07:43:47
Edit Download
4.14 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
20.29 KB lrw-r--r-- 2025-03-31 07:43:47
Edit Download
3.24 KB lrw-r--r-- 2019-03-19 19:47:45
Edit Download
2.54 KB lrw-r--r-- 2019-04-06 17:10:11
Edit Download
1.69 KB lrw-r--r-- 2019-03-19 19:49:57
Edit Download
2.55 KB lrw-r--r-- 2019-04-06 17:50:57
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI