Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ platform.TargetPlatform get defaultTargetPlatform {
result = platform.debugDefaultTargetPlatformOverride;
}
if (result == null) {
throw UiError(
throw FrameworkError(
'Unknown platform.\n'
'${Platform.operatingSystem} was not recognized as a target platform. '
'Consider updating the list of TargetPlatforms to include this platform.',
Expand Down
124 changes: 61 additions & 63 deletions packages/ui_primitives/lib/src/foundation/assertions.dart

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ui_primitives/lib/src/foundation/debug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bool debugAssertAllFoundationVarsUnset(
debugDefaultTargetPlatformOverride != null ||
debugDoublePrecision != null ||
debugBrightnessOverride != null) {
throw UiError(reason);
throw FrameworkError(reason);
}
return true;
}());
Expand Down
4 changes: 2 additions & 2 deletions packages/ui_primitives/lib/src/foundation/diagnostics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ enum DiagnosticsTreeStyle {
///
/// See also:
///
/// * [UiError], which uses this style for the root node in a tree
/// * [FrameworkError], which uses this style for the root node in a tree
/// describing an error.
error,

Expand Down Expand Up @@ -1681,7 +1681,7 @@ abstract class DiagnosticsNode {
// We don't throw in release builds, to avoid hurting users. We also don't
// do anything useful.
if (kProfileMode) {
throw UiError(
throw FrameworkError(
// Parts of this string are searched for verbatim by a test in
// dev/bots/test.dart.
'$DiagnosticsNode.toTimelineArguments used in non-debug build.\n'
Expand Down
2 changes: 1 addition & 1 deletion packages/ui_primitives/lib/src/foundation/platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ TargetPlatform? get debugDefaultTargetPlatformOverride =>

set debugDefaultTargetPlatformOverride(TargetPlatform? value) {
if (!kDebugMode) {
throw UiError(
throw FrameworkError(
'Cannot modify debugDefaultTargetPlatformOverride in non-debug builds.',
);
}
Expand Down
10 changes: 5 additions & 5 deletions packages/ui_primitives/lib/src/foundation/value_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class _ChangeNotifier implements Listenable {
static bool debugAssertNotDisposed(_ChangeNotifier notifier) {
assert(() {
if (notifier._debugDisposed) {
throw UiError(
throw FrameworkError(
'A ${notifier.runtimeType} was used after being disposed.\n'
'Once you have called dispose() on a ${notifier.runtimeType}, it '
'can no longer be used.',
Expand Down Expand Up @@ -281,7 +281,7 @@ class _ChangeNotifier implements Listenable {
/// not be visited after they are removed.
///
/// Exceptions thrown by listeners will be caught and reported using
/// [UiError.reportError].
/// [FrameworkError.reportError].
///
/// This method must not be called after [dispose] has been called.
///
Expand Down Expand Up @@ -316,8 +316,8 @@ class _ChangeNotifier implements Listenable {
try {
_listeners[i]?.call();
} catch (exception, stack) {
UiError.reportError(
UiErrorDetails(
FrameworkError.reportError(
FrameworkErrorDetails(
exception: exception,
stack: stack,
library: 'foundation library',
Expand Down Expand Up @@ -414,7 +414,7 @@ class ValueNotifier<T> implements ValueListenable<T> {
static bool debugAssertNotDisposed<T>(ValueNotifier<T> notifier) {
assert(() {
if (notifier._debugDisposed) {
throw UiError(
throw FrameworkError(
'A ${notifier.runtimeType} was used after being disposed.\n'
'Once you have called dispose() on a ${notifier.runtimeType}, it '
'can no longer be used.',
Expand Down
4 changes: 2 additions & 2 deletions packages/ui_primitives/lib/ui_primitives.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export 'src/foundation/assertions.dart'
RepetitiveStackFrameFilter,
StackFilter,
StackFrame,
UiError,
UiErrorDetails,
FrameworkError,
FrameworkErrorDetails,
debugPrintStack;

export 'src/foundation/diagnostics.dart'
Expand Down
2 changes: 1 addition & 1 deletion packages/ui_primitives/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: ui_primitives
description: Highly experimental package.
repository: https://github.com/flutter/genui/tree/main/packages/ui_primitives
version: 0.0.1-dev-005
version: 0.0.1-dev-006

resolution: workspace

Expand Down
Loading
Loading