mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:52:44 +00:00 
			
		
		
		
	LibJS: Throw real TypeError, ReferenceError, etc objects
Instead of just throwing Error objects with a name string, we now throw the real Error subclass types. :^)
This commit is contained in:
		
							parent
							
								
									58ab76269c
								
							
						
					
					
						commit
						e5da1cc566
					
				
					 13 changed files with 32 additions and 29 deletions
				
			
		|  | @ -66,7 +66,7 @@ Value Array::length_getter(Interpreter& interpreter) | |||
|     if (!this_object) | ||||
|         return {}; | ||||
|     if (!this_object->is_array()) | ||||
|         return interpreter.throw_exception<Error>("TypeError", "Not an array"); | ||||
|         return interpreter.throw_exception<TypeError>("Not an array"); | ||||
|     return Value(static_cast<const Array*>(this_object)->length()); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling