Chromium Code Reviews| 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); |
| +} |