Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit 1f795eb

Browse files
matanlureyalorenzen
authored andcommitted
feat(Runtime): Add a way to display internal-only errors/messages.
This will allow, for example, pointing to documentation on GitHub externally and G3Docs (internally) without making the experience worse for one set of users - copying how we currently do it within the "angular_compiler" package. PiperOrigin-RevId: 259822455
1 parent 9e4b13e commit 1f795eb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

angular/lib/src/runtime.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
/// rely on.
66
library angular.src.runtime;
77

8+
import 'runtime/messages/messages.dart';
9+
810
export 'runtime/check_binding.dart'
911
show
1012
UnstableExpressionError,
@@ -14,3 +16,9 @@ export 'runtime/check_binding.dart'
1416
debugThrowIfChanged;
1517

1618
export 'runtime/optimizations.dart' show isDevMode, unsafeCast;
19+
20+
/// Formatting service for displaying runtime text or error message bodies.
21+
///
22+
/// Internally, this may be implemented differently in order to display internal
23+
/// only links, and likewise when exported to GitHub/Pub.
24+
const runtimeMessages = Messages();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/// Base implementation of runtime message/error formatting.
2+
class Messages {
3+
const Messages();
4+
}

0 commit comments

Comments
 (0)