| Index: runtime/vm/object.h
|
| ===================================================================
|
| --- runtime/vm/object.h (revision 1328)
|
| +++ runtime/vm/object.h (working copy)
|
| @@ -139,7 +139,7 @@
|
| kExceptionHandlersClass,
|
| kContextClass,
|
| kContextScopeClass,
|
| - kApiFailureClass,
|
| + kApiErrorClass,
|
| kMaxId,
|
| kInvalidIndex = -1,
|
| };
|
| @@ -239,7 +239,7 @@
|
| }
|
| static RawClass* context_class() { return context_class_; }
|
| static RawClass* context_scope_class() { return context_scope_class_; }
|
| - static RawClass* api_failure_class() { return api_failure_class_; }
|
| + static RawClass* api_error_class() { return api_error_class_; }
|
|
|
| static int GetSingletonClassIndex(const RawClass* raw_class);
|
| static RawClass* GetSingletonClass(int index);
|
| @@ -332,7 +332,7 @@
|
| static RawClass* exception_handlers_class_; // Class of ExceptionHandlers.
|
| static RawClass* context_class_; // Class of the Context vm object.
|
| static RawClass* context_scope_class_; // Class of ContextScope vm object.
|
| - static RawClass* api_failure_class_; // Class of ApiFailure.
|
| + static RawClass* api_error_class_; // Class of ApiError.
|
|
|
| friend class Class;
|
| friend class SnapshotReader;
|
| @@ -2051,24 +2051,27 @@
|
| };
|
|
|
|
|
| -class ApiFailure : public Object {
|
| +class ApiError : public Object {
|
| public:
|
| - RawString* message() const { return raw_ptr()->message_; }
|
| - static intptr_t message_offset() {
|
| - return OFFSET_OF(RawApiFailure, message_);
|
| + RawObject* data() const { return raw_ptr()->data_; }
|
| + static intptr_t data_offset() {
|
| + return OFFSET_OF(RawApiError, data_);
|
| }
|
|
|
| static intptr_t InstanceSize() {
|
| - return RoundedAllocationSize(sizeof(RawApiFailure));
|
| + return RoundedAllocationSize(sizeof(RawApiError));
|
| }
|
|
|
| - static RawApiFailure* New(const String& message,
|
| - Heap::Space space = Heap::kNew);
|
| + static RawApiError* New(const String& message,
|
| + Heap::Space space = Heap::kNew);
|
|
|
| + static RawApiError* New(const UnhandledException& exception,
|
| + Heap::Space space = Heap::kNew);
|
| +
|
| private:
|
| - void set_message(const String& message) const;
|
| + void set_data(const Object& data) const;
|
|
|
| - HEAP_OBJECT_IMPLEMENTATION(ApiFailure, Object);
|
| + HEAP_OBJECT_IMPLEMENTATION(ApiError, Object);
|
| friend class Class;
|
| };
|
|
|
|
|