mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Simplify rescue catching
				
					
				
			This commit is contained in:
		
							
								
								
									
										8
									
								
								Rakefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Rakefile
									
									
									
									
									
								
							| @@ -28,14 +28,8 @@ task :fetch_ace_modes do | ||||
|   begin | ||||
|     ace_github_modes = (open("https://api.github.com/repos/ajaxorg/ace/contents/lib/ace/mode").read) | ||||
|     File.write(ACE_FIXTURE_PATH, ace_github_modes) | ||||
|   rescue => e | ||||
|     case e | ||||
|     when OpenURI::HTTPError | ||||
|     when SocketError | ||||
|   rescue OpenURI::HTTPError, SocketError | ||||
|       # no internet? no problem. | ||||
|     else | ||||
|       raise e | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user