| 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/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 kInternalError, | 55 kInternalError, |
| 56 kNullThrown, | 56 kNullThrown, |
| 57 kIsolateSpawn, | 57 kIsolateSpawn, |
| 58 kIsolateUnhandledException, | 58 kIsolateUnhandledException, |
| 59 kFiftyThreeBitOverflowError, | 59 kFiftyThreeBitOverflowError, |
| 60 kAssertion, | 60 kAssertion, |
| 61 kCast, | 61 kCast, |
| 62 kType, | 62 kType, |
| 63 kFallThrough, | 63 kFallThrough, |
| 64 kAbstractClassInstantiation, | 64 kAbstractClassInstantiation, |
| 65 kMirroredUncaughtExceptionError, |
| 66 kMirroredCompilationError, |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 static void ThrowByType(ExceptionType type, const Array& arguments); | 69 static void ThrowByType(ExceptionType type, const Array& arguments); |
| 68 static void ThrowOOM(); | 70 static void ThrowOOM(); |
| 69 static void ThrowStackOverflow(); | 71 static void ThrowStackOverflow(); |
| 70 | 72 |
| 71 // Returns a RawInstance if the exception is successfully created, | 73 // Returns a RawInstance if the exception is successfully created, |
| 72 // otherwise returns a RawError. | 74 // otherwise returns a RawError. |
| 73 static RawObject* Create(ExceptionType type, const Array& arguments); | 75 static RawObject* Create(ExceptionType type, const Array& arguments); |
| 74 | 76 |
| 75 private: | 77 private: |
| 76 DISALLOW_COPY_AND_ASSIGN(Exceptions); | 78 DISALLOW_COPY_AND_ASSIGN(Exceptions); |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace dart | 81 } // namespace dart |
| 80 | 82 |
| 81 #endif // VM_EXCEPTIONS_H_ | 83 #endif // VM_EXCEPTIONS_H_ |
| OLD | NEW |