| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 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 | 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 #ifndef VM_EXCEPTIONS_H_ | 5 #ifndef VM_EXCEPTIONS_H_ |
| 6 #define VM_EXCEPTIONS_H_ | 6 #define VM_EXCEPTIONS_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/token_position.h" | 9 #include "vm/token_position.h" |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 static void ThrowArgumentError(const Instance& arg); | 77 static void ThrowArgumentError(const Instance& arg); |
| 78 static void ThrowRangeError(const char* argument_name, | 78 static void ThrowRangeError(const char* argument_name, |
| 79 const Integer& argument_value, | 79 const Integer& argument_value, |
| 80 intptr_t expected_from, | 80 intptr_t expected_from, |
| 81 intptr_t expected_to); | 81 intptr_t expected_to); |
| 82 | 82 |
| 83 // Returns a RawInstance if the exception is successfully created, | 83 // Returns a RawInstance if the exception is successfully created, |
| 84 // otherwise returns a RawError. | 84 // otherwise returns a RawError. |
| 85 static RawObject* Create(ExceptionType type, const Array& arguments); | 85 static RawObject* Create(ExceptionType type, const Array& arguments); |
| 86 | 86 |
| 87 static void PrintStackTraceAndAbort(const char* reason); | |
| 88 | |
| 89 private: | 87 private: |
| 90 DISALLOW_COPY_AND_ASSIGN(Exceptions); | 88 DISALLOW_COPY_AND_ASSIGN(Exceptions); |
| 91 }; | 89 }; |
| 92 | 90 |
| 93 } // namespace dart | 91 } // namespace dart |
| 94 | 92 |
| 95 #endif // VM_EXCEPTIONS_H_ | 93 #endif // VM_EXCEPTIONS_H_ |
| OLD | NEW |