Deprecate CastError.

CastError is deprecated.  See
 https://github.com/dart-lang/sdk/issues/40763 for details.

Change-Id: If00963e68987a259396c4b5a0cd6d703bc7ac76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140885
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Leaf Petersen 2020-03-25 19:41:03 +00:00
parent f10e1ed253
commit a55e37289e
3 changed files with 9 additions and 0 deletions

View file

@ -31,6 +31,11 @@ There are no language changes in this release.
#### `dart:core`
* The class `CastError` is deprecated, and all implementation specific
classes implementing `TypeError` or `CastError` now implement both. In
a future release, `CastError` will be removed. See issue [40763][] for
details.
* Adds `StackTrace.empty` constant which is the stack trace used as default
stack trace when no better alternative is available.
@ -46,6 +51,8 @@ There are no language changes in this release.
convenient to use in-line in, for example, `=>` function bodies or
constructor initialization lists.
[40763]: https://github.com/dart-lang/sdk/issues/40763
#### `dart:developer`
* The constructors for `TimelineTask` now accept an optional `filterKey`

View file

@ -119,6 +119,7 @@ class TypeError extends Error {}
/**
* Error thrown by the runtime system when a cast operation fails.
*/
@Deprecated("Use TypeError instead")
class CastError extends Error {}
/**

View file

@ -117,6 +117,7 @@ class TypeError extends Error {}
/**
* Error thrown by the runtime system when a cast operation fails.
*/
@Deprecated("Use TypeError instead")
class CastError extends Error {}
/**