Skip to content

Commit

Permalink
Show a more actionable error message on "Frame failed" error (#155)
Browse files Browse the repository at this point in the history
* Show a more actionable error message on "Frame failed" error

* Update Gifski/Gifski.swift

Co-Authored-By: 艁ukasz Mr贸z <thesunshinejr@gmail.com>
  • Loading branch information
sindresorhus and sunshinejr committed Oct 25, 2019
1 parent 75b521e commit 5880fd3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Gifski/Gifski.swift
@@ -1,4 +1,4 @@
import Foundation
import Cocoa
import AVFoundation
import Crashlytics

Expand Down Expand Up @@ -206,7 +206,17 @@ final class Gifski {
case .failure where result.isCancelled:
completionHandlerOnce(.failure(.cancelled))
case let .failure(error):
completionHandlerOnce(.failure(.generateFrameFailed(error)))
// TODO: Remove this when we've been able to track down the issue.
completionHandlerOnce(.failure(.cancelled))
DispatchQueue.main.async {
NSAlert.showModal(
message: "Gifski was unable generate frames from the video",
informativeText: "We have been trying to track down this issue for a long time, but we have been unable to reproduce it. It would be awesome if you could send an email to sindresorhus@gmail.com with the video or some information about the video file you tried to convert so we can fix this issue.",
detailText: "\(error)"
)
}

// completionHandlerOnce(.failure(.generateFrameFailed(error)))
}
}
}
Expand Down

0 comments on commit 5880fd3

Please sign in to comment.