﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27140	Prevent template rendering from hiding a property's TypeError	Éloi Rivard	nobody	"If you try to access an object property in a django template, and this property raises a TypeError, then nothing will be raised. If it raises, let's say, a ZeroDivisionError, then the exception is raised.


{{{#!python
from django.template import Context, Template
class FooClassTypeError:
    @property
    def fooproperty(self):
        raise TypeError
        return ""somevalue""

class FooClass:
    @property
    def fooproperty(self):
        return 1/0

t = Template(""{{ obj.fooproperty }}"")

# This call does not raise anything
t.render(Context(dict(obj=FooClassTypeError())))

# This call raises an exception
t.render(Context(dict(obj=FooClass())))
}}}

I think the expected behavior is that both exceptions should be raised. What do you think?"	Bug	closed	Template system	1.10	Normal	fixed			Accepted	1	0	0	0	0	0
