Is it possible to set a breakpoint to whenever an error is thrown?
Break on throw?
I'm not sure, but I thought I saw this being done in a WWDC video. Perhaps "What's New in lldb", or one of the Swift sessions?
Yes, it was mentioned in What’s New in LLDB. The debugger command is:
br s -E swift
It seems that it is not yet possible to enable this breakpoint in the Xcode 7 UI so you have to type it manually in the debugger when you run your program (or put it in your ~/.lldbinit).
That works. Thank you to both of you.