Version 2.12.0-215.0.dev

Merge commit 'ebb2c409e23ba2eee42566fc56691c2882df52c2' into 'dev'
diff --git a/README.md b/README.md
index 924e4c3..79cec90 100644
--- a/README.md
+++ b/README.md
@@ -5,13 +5,13 @@
 Dart is:
 
   * **Optimized for UI**:
-  Develop with a programming language specialized around the needs of user interface creation
+  Develop with a programming language specialized around the needs of user interface creation.
   
   * **Productive**:
-  Make changes iteratively: use hot reload to see the result instantly in your running app
+  Make changes iteratively: use hot reload to see the result instantly in your running app.
   
   * **Fast on all platforms**:
-  Compile to ARM & x64 machine code for mobile,  desktop, and backend. Or compile to JavaScript for the web
+  Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
 
 Dart's flexible compiler technology lets you run Dart code in different ways,
 depending on your target platform and goals:
@@ -34,12 +34,17 @@
 ## Using Dart
 
 Visit [dart.dev][website] to learn more about the
-[language][lang], [tools][tools],
-[getting started][codelab], and more.
+[language][lang], [tools][tools], and to find
+[codelabs][codelabs].
 
 Browse [pub.dev][pubsite] for more packages and libraries contributed
 by the community and the Dart team.
 
+Our API reference documentation is published at [api.dart.dev](https://api.dart.dev),
+based on the stable release. (We also publish docs from our 
+[beta](https://api.dart.dev/beta) and [dev](https://api.dart.dev/dev) channels,
+as well as from the [primary development branch](https://api.dart.dev/be)).
+
 ## Building Dart
 
 If you want to build Dart yourself, here is a guide to
@@ -59,7 +64,7 @@
 [repo]: https://github.com/dart-lang/sdk
 [lang]: https://dart.dev/guides/language/language-tour
 [tools]: https://dart.dev/tools
-[codelab]: https://dart.dev/codelabs
+[codelabs]: https://dart.dev/codelabs
 [dartbug]: http://dartbug.com
 [contrib]: https://github.com/dart-lang/sdk/blob/master/CONTRIBUTING.md
 [pubsite]: https://pub.dev
diff --git a/pkg/analysis_server/test/src/services/correction/fix/convert_to_on_type_test.dart b/pkg/analysis_server/test/src/services/correction/fix/convert_to_on_type_test.dart
index a6daf9b..f14cf3c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/convert_to_on_type_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/convert_to_on_type_test.dart
@@ -23,6 +23,25 @@
   @override
   String get lintCode => LintNames.avoid_types_as_parameter_names;
 
+  Future<void> test_nameReferenced() async {
+    await resolveTestCode('''
+void f() {
+  try {
+  } catch (ArgumentError) {
+    print(ArgumentError);
+  }
+}
+''');
+    await assertHasFix('''
+void f() {
+  try {
+  } on ArgumentError {
+    print(ArgumentError);
+  }
+}
+''');
+  }
+
   Future<void> test_withOnType() async {
     await resolveTestCode('''
 void f() {
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index db09ca0..0e9748d 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -8676,8 +8676,12 @@
    * https://code.google.com/p/dart/issues/detail?id=954
    */
   static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT =
-      CompileTimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT',
-          "Cycle in redirecting generative constructors.");
+      CompileTimeErrorCode(
+          'RECURSIVE_CONSTRUCTOR_REDIRECT',
+          "Constructors can't redirect to themselves either directly or "
+              "indirectly.",
+          correction: 'Try changing one of the constructors in the loop to not '
+              'redirect.');
 
   /**
    * 7.6.2 Factories: It is a compile-time error if a redirecting factory
@@ -8685,8 +8689,13 @@
    * sequence of redirections.
    */
   static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT =
-      CompileTimeErrorCode('RECURSIVE_FACTORY_REDIRECT',
-          "Cycle in redirecting factory constructors.");
+      CompileTimeErrorCode(
+          'RECURSIVE_CONSTRUCTOR_REDIRECT',
+          "Constructors can't redirect to themselves either directly or "
+              "indirectly.",
+          uniqueName: 'RECURSIVE_FACTORY_REDIRECT',
+          correction: 'Try changing one of the constructors in the loop to '
+              'redirect to a non-factory constructor.');
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the interface of a
@@ -11255,8 +11264,10 @@
    */
   static const CompileTimeErrorCode
       WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = CompileTimeErrorCode(
-          'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS',
-          "Operator '-' should declare 0 or 1 parameter, but {0} found.");
+          'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR',
+          "Operator '-' should declare 0 or 1 parameter, but {0} found.",
+          hasPublishedDocs: true,
+          uniqueName: 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS');
 
   /**
    * No parameters.
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
index a4e58e0..75e38cc 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -9985,6 +9985,8 @@
 
 ### wrong_number_of_parameters_for_operator
 
+_Operator '-' should declare 0 or 1 parameter, but {0} found._
+
 _Operator '{0}' should declare exactly {1} parameters, but {2} found._
 
 #### Description
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index cdffae9..ca8e95e 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -592,7 +592,10 @@
   IsolateGroupData* isolate_group_data = nullptr;
   IsolateData* isolate_data = nullptr;
 
-  AppSnapshot* app_snapshot;
+  if (error != nullptr) {
+    *error = nullptr;
+  }
+  AppSnapshot* app_snapshot = nullptr;
   bool isolate_run_app_snapshot = true;
   if (dartdev_path.get() != nullptr &&
       (app_snapshot = Snapshot::TryReadAppSnapshot(dartdev_path.get())) !=
@@ -618,8 +621,10 @@
     isolate_run_app_snapshot = false;
     dartdev_path = DartDevIsolate::TryResolveDartDevKernelPath();
     // Clear error from app snapshot and retry from kernel.
-    free(*error);
-    *error = nullptr;
+    if (*error != nullptr) {
+      free(*error);
+      *error = nullptr;
+    }
 
     if (app_snapshot != nullptr) {
       delete app_snapshot;
diff --git a/tests/language/factory/redirection3_cyclic_test.dart b/tests/language/factory/redirection3_cyclic_test.dart
index 13dc39b..ab115cc 100644
--- a/tests/language/factory/redirection3_cyclic_test.dart
+++ b/tests/language/factory/redirection3_cyclic_test.dart
@@ -17,10 +17,10 @@
 class C implements B {
   factory C.bar() = C.foo;
   //                ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_FACTORY_REDIRECT
+  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT
   factory C.foo() = C.bar();
   //                ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_FACTORY_REDIRECT
+  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT
   //                  ^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected ';' after this.
diff --git a/tests/language/operator/invalid_operators_test.dart b/tests/language/operator/invalid_operators_test.dart
index e961cd4..27bac6a 100644
--- a/tests/language/operator/invalid_operators_test.dart
+++ b/tests/language/operator/invalid_operators_test.dart
@@ -106,7 +106,7 @@
   // [cfe] Operator '>=' should have exactly one parameter.
   operator -(a, b) => true;
   //       ^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
   // [cfe] Operator '-' should have zero or one parameter.
   operator +(a, b) => true;
   //       ^
@@ -367,7 +367,7 @@
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
   operator -(a, [b]) => true;
   //       ^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
   // [cfe] Operator '-' should have zero or one parameter.
   //             ^
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
@@ -484,7 +484,7 @@
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
   operator -(a, {b}) => true;
   //       ^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
   // [cfe] Operator '-' should have zero or one parameter.
   //             ^
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
diff --git a/tests/language/regress/regress23038_test.dart b/tests/language/regress/regress23038_test.dart
index bf5cbd0..0967098 100644
--- a/tests/language/regress/regress23038_test.dart
+++ b/tests/language/regress/regress23038_test.dart
@@ -10,7 +10,7 @@
 // [cfe] Cyclic definition of factory 'C'.
     = C<C<T>>
     //^^^^^^^
-    // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_FACTORY_REDIRECT
+    // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT
     // [cfe] The constructor function type 'C<C<T>> Function()' isn't a subtype of 'C<T> Function()'.
   ;
 }
diff --git a/tests/language_2/factory/redirection3_cyclic_test.dart b/tests/language_2/factory/redirection3_cyclic_test.dart
index 13dc39b..ab115cc 100644
--- a/tests/language_2/factory/redirection3_cyclic_test.dart
+++ b/tests/language_2/factory/redirection3_cyclic_test.dart
@@ -17,10 +17,10 @@
 class C implements B {
   factory C.bar() = C.foo;
   //                ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_FACTORY_REDIRECT
+  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT
   factory C.foo() = C.bar();
   //                ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_FACTORY_REDIRECT
+  // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT
   //                  ^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected ';' after this.
diff --git a/tests/language_2/operator/invalid_operators_test.dart b/tests/language_2/operator/invalid_operators_test.dart
index b8e7ccb..32b6399 100644
--- a/tests/language_2/operator/invalid_operators_test.dart
+++ b/tests/language_2/operator/invalid_operators_test.dart
@@ -106,7 +106,7 @@
   // [cfe] Operator '>=' should have exactly one parameter.
   operator -(a, b) => true;
   //       ^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
   // [cfe] Operator '-' should have zero or one parameter.
   operator +(a, b) => true;
   //       ^
@@ -366,7 +366,7 @@
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
   operator -(a, [b]) => true;
   //       ^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
   // [cfe] Operator '-' should have zero or one parameter.
   //             ^
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
@@ -483,7 +483,7 @@
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
   operator -(a, {b}) => true;
   //       ^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
   // [cfe] Operator '-' should have zero or one parameter.
   //             ^
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
diff --git a/tests/language_2/regress/regress23038_test.dart b/tests/language_2/regress/regress23038_test.dart
index bf5cbd0..0967098 100644
--- a/tests/language_2/regress/regress23038_test.dart
+++ b/tests/language_2/regress/regress23038_test.dart
@@ -10,7 +10,7 @@
 // [cfe] Cyclic definition of factory 'C'.
     = C<C<T>>
     //^^^^^^^
-    // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_FACTORY_REDIRECT
+    // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT
     // [cfe] The constructor function type 'C<C<T>> Function()' isn't a subtype of 'C<T> Function()'.
   ;
 }
diff --git a/tools/VERSION b/tools/VERSION
index 5ddc437..2a0644f 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 12
 PATCH 0
-PRERELEASE 214
+PRERELEASE 215
 PRERELEASE_PATCH 0
\ No newline at end of file