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

Unified Diff: dart_vm_standalone/rasta_errors.dart

Issue 2108193002: Change error handling. (Closed) Base URL: git@github.com:dart-lang/rasta.git@master
Patch Set: Address comments Created 4 years, 6 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
« no previous file with comments | « dart_vm_standalone/core_patch.dart ('k') | lib/kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart_vm_standalone/rasta_errors.dart
diff --git a/dart_vm_standalone/rasta_errors.dart b/dart_vm_standalone/rasta_errors.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4a62b89027afac6a39d46031bfe7a6793e3025cc
--- /dev/null
+++ b/dart_vm_standalone/rasta_errors.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+library dart.core._rasta_errors;
+
+// RastaK generates calls to these methods -- all backends must provide them
+// in their patch for "dart:core".
+//
+// In the future, we could have a single `rasta_errors.dart` for all backends to
+// ensure consistent error messages across all backends.
+//
+// But for now, we just want errors that are consistent with the VM, so these
+// methods just reuse what is in the VM.
+
+_unresolvedConstructorError(
+ Object typeLiteral,
+ String fullConstructorName,
+ List arguments,
+ Map<Symbol, dynamic> namedArguments,
+ List existingArgumentNames) {
+ return new NoSuchMethodError._withType(
+ typeLiteral,
+ fullConstructorName,
+ _InvocationMirror._CONSTRUCTOR << _InvocationMirror._CALL_SHIFT,
+ arguments,
+ namedArguments,
+ existingArgumentNames);
+}
+
+_malformedTypeError(String errorMessage) {
+ return new _TypeError._create(null, null, null, errorMessage);
+}
« no previous file with comments | « dart_vm_standalone/core_patch.dart ('k') | lib/kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698