| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 interface TotalException { | |
| 6 String toString(); | |
| 7 } | |
| 8 | |
| 9 class FormulaException implements TotalException { | |
| 10 final String _message; | |
| 11 | |
| 12 // when Dart supports optional args, message will be optional | |
| 13 const FormulaException(String this._message); | |
| 14 | |
| 15 String toString() => _message; | |
| 16 } | |
| 17 | |
| 18 class BadFormulaException extends FormulaException { | |
| 19 const BadFormulaException() : super("#BADFORMULA!"); | |
| 20 } | |
| 21 | |
| 22 class CycleException extends FormulaException { | |
| 23 const CycleException() : super("#CYCLE!"); | |
| 24 } | |
| 25 | |
| 26 class DivByZeroException extends FormulaException { | |
| 27 const DivByZeroException() : super("#DIV/0!"); | |
| 28 } | |
| 29 | |
| 30 class FunctionException extends FormulaException { | |
| 31 const FunctionException() : super("#FUNC!"); | |
| 32 } | |
| 33 | |
| 34 class NumArgsException extends FormulaException { | |
| 35 const NumArgsException() : super("#NARGS!"); | |
| 36 } | |
| 37 | |
| 38 class NumberException extends FormulaException { | |
| 39 const NumberException() : super("#NUM!"); | |
| 40 } | |
| 41 | |
| 42 class RefException extends FormulaException { | |
| 43 const RefException() : super("#REF!"); | |
| 44 } | |
| 45 | |
| 46 class ValueException extends FormulaException { | |
| 47 const ValueException() : super("#VALUE!"); | |
| 48 } | |
| 49 | |
| 50 class RuntimeException implements TotalException { | |
| 51 final String _message; | |
| 52 | |
| 53 // when Dart supports optional args, message will be optional | |
| 54 const RuntimeException(String this._message); | |
| 55 | |
| 56 String toString() => _message; | |
| 57 } | |
| OLD | NEW |