Skip to content

Commit

Permalink
Add runtime logs (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnmrndn committed Jun 22, 2021
1 parent 74f324b commit ffa89f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/BrightroomEngine/Core/EditingStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ open class EditingStack: Equatable, StoreComponentType {
orientation: metadata.orientation
)
} catch {
EngineSanitizer.global.onDidFindRuntimeError(.failedToRenderCGImageForCrop(sourceImage: editingSourceCGImage))
assertionFailure()
return editingSourceCGImage
}
Expand Down
1 change: 1 addition & 0 deletions Sources/BrightroomEngine/Library/EngineSanitizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import CoreGraphics
public enum EngineRuntimeError: Swift.Error {
case failedToCreateResizedCGImage(sourceImage: CGImage, maxPixelSize: CGFloat)
case failedToCreateCGContext(sourceImage: CGImage)
case failedToRenderCGImageForCrop(sourceImage: CGImage)
}

public final class EngineSanitizer {
Expand Down

0 comments on commit ffa89f3

Please sign in to comment.