\input eplain

First, let's make sure they work.

\loggingall

\environment{outer}
   \environment{inner}
     This is in the first inner.
   \endenvironment{inner}
   
   This is between inners.
   
   \environment{inner}
     This is in the second inner.
     
     \environment{even-more-inner}
       This is even more inner.
     \endenvironment{even-more-inner}
   \endenvironment{inner}
\endenvironment{outer}

This is after the outer.

Now let's make some mistakes.

%\environment{start-1}
%\endenvironment{end-2}

\endenvironment{where-is-the-start?}

\begingroup
\endenvironment{begingroup-started}

\environment{endgroup-ended}
\endgroup

\environment{noend}

\end
