improve error message
This commit is contained in:
		
							parent
							
								
									2ee3c65405
								
							
						
					
					
						commit
						3cd1390539
					
				| @ -162,6 +162,10 @@ function LEX(obj, app) { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function listen(plainPorts, tlsPorts, onListening) { |   function listen(plainPorts, tlsPorts, onListening) { | ||||||
|  |     if (plainPorts && (!Array.isArray(plainPorts) || !Array.isArray(tlsPorts))) { | ||||||
|  |       throw new Error(".listen() must be used with plain and tls port arrays, like this: `.listen([80], [443, 5001], function () {})`"); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     var results = { |     var results = { | ||||||
|       plainServers: [] |       plainServers: [] | ||||||
|     , tlsServers: [] |     , tlsServers: [] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user