mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	blueslip: Replace fatal with throw new Error(…).
This makes it clear to humans and ESLint that execution will not continue. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							93a0680881
						
					
				
				
					commit
					fe66aef0ad
				
			@@ -761,8 +761,8 @@ exports.create_streams = function (streams) {
 | 
			
		||||
 | 
			
		||||
exports.create_sub_from_server_data = function (attrs) {
 | 
			
		||||
    if (!attrs.stream_id) {
 | 
			
		||||
        // fail fast (blueslip.fatal will throw an error on our behalf)
 | 
			
		||||
        blueslip.fatal("We cannot create a sub without a stream_id");
 | 
			
		||||
        // fail fast
 | 
			
		||||
        throw new Error("We cannot create a sub without a stream_id");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let sub = exports.get_sub_by_id(attrs.stream_id);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user