Skip to content

Instantly share code, notes, and snippets.

@BrunoMiguens
Last active May 24, 2019 15:35
Show Gist options
  • Save BrunoMiguens/d9df9d3b05ecbb724fa7bb31b3d66d96 to your computer and use it in GitHub Desktop.
Save BrunoMiguens/d9df9d3b05ecbb724fa7bb31b3d66d96 to your computer and use it in GitHub Desktop.
[Medium] Swift: Using Javascript library - JSContext Exception Handler
import JavaScriptCore
let context = JSContext()
context?.exceptionHandler = { context, exception in
print("JS Error: \(exception!)") // Do not use force unwrap `!`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment