Yes, it's in the AVAudioPlayer init. I do have a catch, and it never gets
there. Things stop on that player instantiation. I've turned the breakpoint
off for now and things seem to be working perfectly. I have a post on the
Apple Dev Forum about it as well. Thanks for your input!

On Fri, Feb 19, 2016 at 2:08 PM Quincey Morris <
quinceymor...@rivergatesoftware.com> wrote:

> On Feb 19, 2016, at 10:45 , Eric E. Dolecki <edole...@gmail.com> wrote:
>
>
> I have an app where I have a breakpoint set for Swift Error. If it's on and
> I run the debug app, I get the breakpoint for a crash.
>
> try player = AVAudioPlayer(contentsOfURL: url)
>
>
> What, according to the backtrace, is the point of the error, where the
> throw is? Is the throw inside the AVAudioPlayer init at least?
>
> Note that since you have a ‘try’, you have a ‘catch’ somewhere. If an
> error is being returned to you, you should be able to see it somewhere. If
> necessary, you can enclose *this* try in a do-catch construct — to get an
> immediate look at the error — and then end the catch block with ‘throw
> error’ to rethrow.
>
> Unfortunately, using a Swift error breakpoint opens up the possibility of
> the debugger stopping on errors handled internally by the Cocoa frameworks,
> which is an annoyance for debugging your code. (You often see this problem
> when debugging system frameworks, such as the security framework, which are
> written in C++, where exceptions are also used for flow control, if you
> leave a C++ exception breakpoint enabled.)
>
> The other thing to verify is that it’s stopping on a Swift error, not an
> Obj-C exception. In an app I’m currently debugging, I turned on the Obj-C
> exception breakpoint, and now it stops when instantiating a document window
> controller from the main storyboard. It’s something handled internally
> apparently, if I continue, everything is OK.
>
> Lastly, when the debugger stops on an Obj-C exception, it usually hasn’t
> printed the error message to the console yet. If the error is repeatable,
> it’s worth clicking the Continue button (several times if necessary) to
> give the error a chance to be logged. If there’s nothing logged, then this
> may be a break you just need to ignore.
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to