/** * Helper to report error for given node position in ast tree. */ private RuntimeException reportError(final AstNode node, final String message, Object... params) { throw Context.reportRuntimeError(String.format(message, params), source.getAbsolutePath(), node.getLineno(), // seems to always be the line before? node.debugPrint(), 0 // line-offset is unknown? ); }