Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Unified Diff: samples/ui_lib/layout/GridLayoutParams.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samples/ui_lib/layout/GridLayoutParams.dart
diff --git a/samples/ui_lib/layout/GridLayoutParams.dart b/samples/ui_lib/layout/GridLayoutParams.dart
index 586abbfe963624417dbf17408563fb88c47a1dab..64816478ffe7671010ed619158a9c72c595c1a1b 100644
--- a/samples/ui_lib/layout/GridLayoutParams.dart
+++ b/samples/ui_lib/layout/GridLayoutParams.dart
@@ -44,7 +44,7 @@ class GridLayoutParams extends LayoutParams {
row = line.start;
if (line.length != null) {
if (rowSpan != null) {
- throw new UnsupportedOperationException(
+ throw new StateError(
'grid-row-span cannot be with grid-row that defines an end');
}
rowSpan = line.length;
@@ -58,7 +58,7 @@ class GridLayoutParams extends LayoutParams {
column = line.start;
if (line.length != null) {
if (columnSpan != null) {
- throw new UnsupportedOperationException(
+ throw new StateError(
'grid-column-span cannot be with grid-column that defines an end');
}
columnSpan = line.length;
@@ -73,12 +73,12 @@ class GridLayoutParams extends LayoutParams {
// better and resolve conflicts more intelligently.
if (row != null || column != null ||
rowSpan != null || columnSpan != null) {
- throw new UnsupportedOperationException(
+ throw new StateError(
'grid-cell cannot be used with grid-row and grid-column');
}
if (layout.template == null) {
- throw new UnsupportedOperationException(
+ throw new StateError(
'grid-cell requires that grid-template is set on the parent');
}
@@ -94,7 +94,7 @@ class GridLayoutParams extends LayoutParams {
if (columnSpan == null) columnSpan = 1;
if (row == null && column == null) {
- throw new UnsupportedOperationException('grid-flow is not implemented'
+ throw new StateError('grid-flow is not implemented'
+ ' so at least one row or one column must be defined');
}

Powered by Google App Engine
This is Rietveld 408576698