code: private static Transition makeTransitionToError(Pattern regex, final String message) {
      return new Transition(regex) {
        @Override
        Context computeNextContext(RawTextNode node, int offset, Context prior, Matcher matcher) {
          throw SoyAutoescapeException.createWithNode(
              message, node.substring(Integer.MAX_VALUE, offset));
        }
      };
    }
docs: A transition to an state.