mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| load("test-common.js");
 | |
| 
 | |
| try {
 | |
|   throw 1;
 | |
|   assertNotReached();
 | |
| } catch (e) {
 | |
|   assert(e === 1);
 | |
| }
 | |
| 
 | |
| try {
 | |
|   throw [99];
 | |
|   assertNotReached();
 | |
| } catch (e) {
 | |
|   assert(typeof e === "object");
 | |
|   assert(e.length === 1);
 | |
| }
 | |
| 
 | |
| function foo() {
 | |
|   throw "hello";
 | |
|   assertNotReached();
 | |
| }
 | |
| 
 | |
| try {
 | |
|   foo();
 | |
|   assertNotReached();
 | |
| } catch (e) {
 | |
|   assert(e === "hello");
 | |
| }
 | |
| 
 | |
| console.log("PASS");
 | 
