Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 library dart.core._rasta_errors; | |
|
ahe
2016/06/29 15:53:56
Add copyright.
asgerf
2016/06/30 08:47:33
Done.
| |
| 2 | |
| 3 // RastaK generates calls to these methods -- all backends must provide them | |
| 4 // in their patch for "dart:core". | |
| 5 // | |
| 6 // In the future, we could have a single `rasta_errors.dart` for all backends to | |
| 7 // ensure consistent error messages across all backends. | |
| 8 // | |
| 9 // But for now, we just want errors that are consistent with the VM, so these | |
| 10 // methods just reuse what is in the VM. | |
| 11 | |
| 12 _unresolvedConstructorError( | |
| 13 Object typeLiteral, | |
| 14 String fullConstructorName, | |
| 15 List arguments, | |
| 16 Map<Symbol, dynamic> namedArguments, | |
| 17 List existingArgumentNames) { | |
| 18 return new NoSuchMethodError._withType( | |
| 19 typeLiteral, | |
| 20 fullConstructorName, | |
| 21 _InvocationMirror._CONSTRUCTOR << _InvocationMirror._CALL_SHIFT, | |
| 22 arguments, | |
| 23 namedArguments, | |
| 24 existingArgumentNames); | |
| 25 } | |
| 26 | |
| 27 _malformedTypeError(String errorMessage) { | |
| 28 return new _TypeError._create(null, null, null, errorMessage); | |
| 29 } | |
| OLD | NEW |