| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class Error { | 5 class Error { |
| 6 const Error(); | 6 const Error(); |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Safely convert a value to a [String] description. | 9 * Safely convert a value to a [String] description. |
| 10 * | 10 * |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 class OutOfMemoryError implements Error { | 239 class OutOfMemoryError implements Error { |
| 240 const OutOfMemoryError(); | 240 const OutOfMemoryError(); |
| 241 String toString() => "Out of Memory"; | 241 String toString() => "Out of Memory"; |
| 242 } | 242 } |
| 243 | 243 |
| 244 class StackOverflowError implements Error { | 244 class StackOverflowError implements Error { |
| 245 const StackOverflowError(); | 245 const StackOverflowError(); |
| 246 String toString() => "Stack Overflow"; | 246 String toString() => "Stack Overflow"; |
| 247 } | 247 } |
| 248 |
| 249 /** |
| 250 * Error thrown when a runtime error occurs. |
| 251 */ |
| 252 class RuntimeError implements Error { |
| 253 final message; |
| 254 RuntimeError(this.message); |
| 255 String toString() => "RuntimeError: $message"; |
| 256 } |
| OLD | NEW |