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 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 kNullThrown, | 58 kNullThrown, |
59 kIsolateSpawn, | 59 kIsolateSpawn, |
60 kIsolateUnhandledException, | 60 kIsolateUnhandledException, |
61 kJavascriptIntegerOverflowError, | 61 kJavascriptIntegerOverflowError, |
62 kJavascriptCompatibilityError, | 62 kJavascriptCompatibilityError, |
63 kAssertion, | 63 kAssertion, |
64 kCast, | 64 kCast, |
65 kType, | 65 kType, |
66 kFallThrough, | 66 kFallThrough, |
67 kAbstractClassInstantiation, | 67 kAbstractClassInstantiation, |
| 68 kCyclicInitializationError, |
68 }; | 69 }; |
69 | 70 |
70 static void ThrowByType(ExceptionType type, const Array& arguments); | 71 static void ThrowByType(ExceptionType type, const Array& arguments); |
71 static void ThrowOOM(); | 72 static void ThrowOOM(); |
72 static void ThrowStackOverflow(); | 73 static void ThrowStackOverflow(); |
73 static void ThrowArgumentError(const Instance& arg); | 74 static void ThrowArgumentError(const Instance& arg); |
74 static void ThrowJavascriptCompatibilityError(const char* msg); | 75 static void ThrowJavascriptCompatibilityError(const char* msg); |
75 | 76 |
76 // Returns a RawInstance if the exception is successfully created, | 77 // Returns a RawInstance if the exception is successfully created, |
77 // otherwise returns a RawError. | 78 // otherwise returns a RawError. |
78 static RawObject* Create(ExceptionType type, const Array& arguments); | 79 static RawObject* Create(ExceptionType type, const Array& arguments); |
79 | 80 |
80 private: | 81 private: |
81 DISALLOW_COPY_AND_ASSIGN(Exceptions); | 82 DISALLOW_COPY_AND_ASSIGN(Exceptions); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace dart | 85 } // namespace dart |
85 | 86 |
86 #endif // VM_EXCEPTIONS_H_ | 87 #endif // VM_EXCEPTIONS_H_ |
OLD | NEW |