getSource method

String getSource(
  1. String path
)

Get template source from file.

Throws TemplateNotFound if file not found or UnsupportedError if don't has access to source.

Implementation

String getSource(String path) {
  if (!hasSourceAccess) {
    throw UnsupportedError('This loader cannot provide access to the source');
  }

  throw TemplateNotFound(path: path);
}