diff --git a/lib/jazzy/sourcekitten.rb b/lib/jazzy/sourcekitten.rb
index <HASH>..<HASH> 100644
--- a/lib/jazzy/sourcekitten.rb
+++ b/lib/jazzy/sourcekitten.rb
@@ -120,7 +120,10 @@ module Jazzy
 
     # Run sourcekitten with given arguments and return STDOUT
     def self.run_sourcekitten(arguments)
-      xcode = XCInvoke::Xcode.find_swift_version(Config.instance.swift_version)
+      swift_version = Config.instance.swift_version
+      unless xcode = XCInvoke::Xcode.find_swift_version(swift_version)
+        raise "Unable to find an Xcode with swift version #{swift_version}."
+      end
       bin_path = Pathname(__FILE__).parent + 'SourceKitten/bin/sourcekitten'
       output, _ = Executable.execute_command(bin_path, arguments, true,
                                              env: xcode.as_env)
[SourceKitten] Print a friendly error when unable to find an Xcode for the given swift version