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

Unified Diff: samples/ui_lib/layout/GridTracks.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/GridTracks.dart
diff --git a/samples/ui_lib/layout/GridTracks.dart b/samples/ui_lib/layout/GridTracks.dart
index 0ec317330325e5e76ca83d0fd6adc0c741ceb755..2a9eb24aa0b510a0e2878f2f681e8cefa477750c 100644
--- a/samples/ui_lib/layout/GridTracks.dart
+++ b/samples/ui_lib/layout/GridTracks.dart
@@ -74,7 +74,7 @@ class GridItemAlignment {
case 'start': case 'end': case 'center': case 'stretch':
break;
default:
- throw new UnsupportedOperationException(
+ throw new StateError(
'invalid row/column alignment "$value"');
}
}
@@ -137,12 +137,12 @@ class GridTemplate {
*/
_GridTemplateRect lookupCell(String cell) {
if (cell.length != 1) {
- throw new UnsupportedOperationException(
+ throw new StateError(
'grid-cell "$cell" must be a one character string');
}
final rect = _rects[cell.charCodeAt(0)];
if (rect == null) {
- throw new UnsupportedOperationException(
+ throw new StateError(
'grid-cell "$cell" not found in parent\'s grid-template');
}
return rect;
@@ -168,7 +168,7 @@ class _GridTemplateRect {
// TODO(jmesserly): not sure if we should throw here, due to CSS's
// permissiveness. At the moment we're noisy about errors.
String cell = new String.fromCharCodes([_char]);
- throw new UnsupportedOperationException('grid-template "$cell"'
+ throw new StateError('grid-template "$cell"'
' is not square, expected $expected cells but got $_count');
}
}

Powered by Google App Engine
This is Rietveld 408576698