8000 Throw an exception if the filter is not found (#209) · jinja2cpp/Jinja2Cpp@38212b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 38212b2

Browse files
Throw an exception if the filter is not found (#209)
1 parent fe911a9 commit 38212b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/filters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ InternalValue UserDefinedFilter::Filter(const InternalValue& baseVal, RenderCont
10611061
bool filterFound = false;
10621062
auto filterValPtr = context.FindValue(m_filterName, filterFound);
10631063
if (!filterFound)
1064-
return InternalValue();
1064+
throw std::runtime_error("Can't find filter '" + m_filterName + "'");
10651065

10661066
const Callable* callable = GetIf<Callable>(&filterValPtr->second);
10671067
if (callable == nullptr || callable->GetKind() != Callable::UserCallable)

0 commit comments

Comments
 (0)
0