mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:22:43 +00:00 
			
		
		
		
	 c503a28e19
			
		
	
	
		c503a28e19
		
	
	
	
	
		
			
			This is our way of implementing the [[ErrorData]] internal slot, which is being used in Object.prototype.toString().
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			512 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			512 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibJS/Runtime/AggregateError.h>
 | |
| #include <LibJS/Runtime/Error.h>
 | |
| #include <LibJS/Runtime/GlobalObject.h>
 | |
| 
 | |
| namespace JS {
 | |
| 
 | |
| AggregateError* AggregateError::create(GlobalObject& global_object)
 | |
| {
 | |
|     return global_object.heap().allocate<AggregateError>(global_object, *global_object.aggregate_error_prototype());
 | |
| }
 | |
| 
 | |
| AggregateError::AggregateError(Object& prototype)
 | |
|     : Error(prototype)
 | |
| {
 | |
| }
 | |
| 
 | |
| }
 |