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

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: 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
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..4a23ce6fc45259e3f13bae9b39dc912afdbb33d6
--- /dev/null
+++ b/dart_vm_standalone/rasta_errors.dart
@@ -0,0 +1,29 @@
+library dart.core._rasta_errors;
ahe 2016/06/29 15:53:56 Add copyright.
asgerf 2016/06/30 08:47:33 Done.
+
+// 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') | lib/unresolved.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698