Banish more underscores
diff --git a/lib/src/lambda_context.dart b/lib/src/lambda_context.dart
index 135a23e..5a8aa2e 100644
--- a/lib/src/lambda_context.dart
+++ b/lib/src/lambda_context.dart
@@ -19,8 +19,8 @@
if (_closed) throw _error('LambdaContext accessed outside of callback.');
}
- _TemplateException _error(String msg) {
- return new _TemplateException(msg, _context.templateName, _context.source,
+ TemplateException _error(String msg) {
+ return new TemplateException(msg, _context.templateName, _context.source,
_node.start);
}
diff --git a/lib/src/parse.dart b/lib/src/parse.dart
index 9f73111..a147ce4 100644
--- a/lib/src/parse.dart
+++ b/lib/src/parse.dart
@@ -49,7 +49,7 @@
case _CLOSE_SECTION:
if (stack.last.name != t.value) {
- throw new _TemplateException(
+ throw new TemplateException(
"Mismatched tag, expected: '${stack.last.name}', was: '${t.value}'",
templateName, source, t.start);
}
@@ -74,7 +74,7 @@
}
if (stack.length != 1) {
- throw new _TemplateException(
+ throw new TemplateException(
"Unclosed tag: '${stack.last.name}'.",
templateName, source, stack.last.start);
}
diff --git a/lib/src/render_context.dart b/lib/src/render_context.dart
index d506209..a3b6e78 100644
--- a/lib/src/render_context.dart
+++ b/lib/src/render_context.dart
@@ -122,5 +122,5 @@
}
m.TemplateException error(String message, Node node)
- => new _TemplateException(message, templateName, source, node.start);
+ => new TemplateException(message, templateName, source, node.start);
}
diff --git a/lib/src/scanner.dart b/lib/src/scanner.dart
index 5b3908c..4120ce7 100644
--- a/lib/src/scanner.dart
+++ b/lib/src/scanner.dart
@@ -77,11 +77,11 @@
int c = _read();
if (c == _EOF) {
- throw new _TemplateException('Unexpected end of input',
+ throw new TemplateException('Unexpected end of input',
_templateName, _source, _offset);
} else if (c != expectedCharCode) {
- throw new _TemplateException('Unexpected character, '
+ throw new TemplateException('Unexpected character, '
'expected: ${new String.fromCharCode(expectedCharCode)} ($expectedCharCode), '
'was: ${new String.fromCharCode(c)} ($c)',
_templateName, _source, _offset);
@@ -323,7 +323,7 @@
}
m.TemplateException _error(String message) {
- return new _TemplateException(message, _templateName, _source, _offset);
+ return new TemplateException(message, _templateName, _source, _offset);
}
}
@@ -350,7 +350,7 @@
s.codeUnits[3],
s.codeUnits[4]];
} else {
- throw new _TemplateException(
+ throw new TemplateException(
'Invalid delimiter string $s', null, null, null);
}
}
diff --git a/lib/src/template.dart b/lib/src/template.dart
index 30b1455..db4cf3a 100644
--- a/lib/src/template.dart
+++ b/lib/src/template.dart
@@ -36,9 +36,9 @@
}
}
-class _TemplateException implements m.TemplateException {
+class TemplateException implements m.TemplateException {
- _TemplateException(this.message, this.templateName, this.source, this.offset);
+ TemplateException(this.message, this.templateName, this.source, this.offset);
final String message;
final String templateName;