Index: runtime/vm/exceptions.cc |
=================================================================== |
--- runtime/vm/exceptions.cc (revision 5367) |
+++ runtime/vm/exceptions.cc (working copy) |
@@ -298,47 +298,64 @@ |
RawObject* Exceptions::Create( |
ExceptionType type, const GrowableArray<const Object*>& arguments) { |
+ Library& library = Library::Handle(); |
String& class_name = String::Handle(); |
switch (type) { |
case kIndexOutOfRange: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("IndexOutOfRangeException"); |
break; |
case kIllegalArgument: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("IllegalArgumentException"); |
break; |
case kNoSuchMethod: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("NoSuchMethodException"); |
break; |
case kClosureArgumentMismatch: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("ClosureArgumentMismatchException"); |
break; |
case kObjectNotClosure: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("ObjectNotClosureException"); |
break; |
case kBadNumberFormat: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("BadNumberFormatException"); |
break; |
case kStackOverflow: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("StackOverflowException"); |
break; |
case kOutOfMemory: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("OutOfMemoryException"); |
break; |
case kWrongArgumentCount: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("WrongArgumentCountException"); |
break; |
case kInternalError: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("InternalError"); |
break; |
case kNullPointer: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("NullPointerException"); |
break; |
case kIllegalJSRegExp: |
+ library = Library::CoreLibrary(); |
class_name = String::NewSymbol("IllegalJSRegExpException"); |
break; |
+ case kIsolateSpawn: |
+ library = Library::IsolateLibrary(); |
+ class_name = String::NewSymbol("IsolateSpawnException"); |
+ break; |
} |
- return DartLibraryCalls::ExceptionCreate(class_name, arguments); |
+ return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); |
} |
} // namespace dart |