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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 static RawInstance* NewInstance(const char* class_name); | 43 static RawInstance* NewInstance(const char* class_name); |
44 static void CreateAndThrowTypeError(intptr_t location, | 44 static void CreateAndThrowTypeError(intptr_t location, |
45 const String& src_type_name, | 45 const String& src_type_name, |
46 const String& dst_type_name, | 46 const String& dst_type_name, |
47 const String& dst_name, | 47 const String& dst_name, |
48 const String& error_msg); | 48 const String& error_msg); |
49 | 49 |
50 enum ExceptionType { | 50 enum ExceptionType { |
51 kNone, | 51 kNone, |
52 kRange, | 52 kRange, |
| 53 kRangeRange, |
53 kArgument, | 54 kArgument, |
54 kNoSuchMethod, | 55 kNoSuchMethod, |
55 kFormat, | 56 kFormat, |
56 kUnsupported, | 57 kUnsupported, |
57 kStackOverflow, | 58 kStackOverflow, |
58 kOutOfMemory, | 59 kOutOfMemory, |
59 kNullThrown, | 60 kNullThrown, |
60 kIsolateSpawn, | 61 kIsolateSpawn, |
61 kIsolateUnhandledException, | 62 kIsolateUnhandledException, |
62 kJavascriptIntegerOverflowError, | 63 kJavascriptIntegerOverflowError, |
(...skipping 20 matching lines...) Expand all Loading... |
83 // otherwise returns a RawError. | 84 // otherwise returns a RawError. |
84 static RawObject* Create(ExceptionType type, const Array& arguments); | 85 static RawObject* Create(ExceptionType type, const Array& arguments); |
85 | 86 |
86 private: | 87 private: |
87 DISALLOW_COPY_AND_ASSIGN(Exceptions); | 88 DISALLOW_COPY_AND_ASSIGN(Exceptions); |
88 }; | 89 }; |
89 | 90 |
90 } // namespace dart | 91 } // namespace dart |
91 | 92 |
92 #endif // VM_EXCEPTIONS_H_ | 93 #endif // VM_EXCEPTIONS_H_ |
OLD | NEW |