# Error from fragile beamer-frame within etoolbox's ifbool

Based on etoolbox booleans, I am (un)selecting Beamer slides. When I try to do this with a fragile frame I run into errors. See MWE.

Could you explain why, and would you have a workaround for this? I would prefer to stay with etoolbox's booleans if possible.

Minimal working example (MWE)

\documentclass{beamer}
\usepackage{etoolbox}

\begin{document}
\begin{frame}[fragile]
Fails...
\end{frame}
}{}
\end{document}


results in the following error:

File ended while scanning use of \next.

a fragile frame is like verbatim and can not be in the argument of another command. use the primitive form \ifaddcontent .....\fi not the form using {} arguments

\documentclass{beamer}
\usepackage{etoolbox}

• Thanks - extremely helpful! Just, Fails... may be replaced by Works... now ;) Aug 24 at 19:05
• For the sake of completeness, the inverse case or a switch can be realized via \else, e.g. \ifaddcontent\else.......\fi Aug 25 at 6:09