1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-08 14:25:05 +00:00

Ensured an exception is thrown if no machine to run a file is found. E.g. right now if you tried to open a ZX Spectrum .tap.

This commit is contained in:
Thomas Harte
2016-10-11 21:03:01 -04:00
parent 4f78d693e9
commit cbc3d28217

View File

@@ -120,6 +120,8 @@ class MachineDocument:
if let analyser = CSStaticAnalyser(fileAt: url) { if let analyser = CSStaticAnalyser(fileAt: url) {
self.displayName = analyser.displayName self.displayName = analyser.displayName
self.configureAs(analyser) self.configureAs(analyser)
} else {
throw NSError(domain: "MachineDocument", code: -1, userInfo: nil)
} }
} }