Re: Break on assert


 

On Nov 1, 2020, at 6:28 PM, Bernie Maier <apple-dev@worklists.blurk.net> wrote:

It's possible that this is not actually an assertion / exception in the runtime sense. There's nothing stopping developers from "helpfully" documenting their assumptions (i.e. asserting their assumptions) with a simple log message with the literal text "[Assert] some dev message".
Right. There's no single notion of what an "assertion" is — it's just a boolean test that does Something if it fails. The "Something" could be throwing an exception (Obj-C, C++), raising a SIGABORT signal (C), or whatever else. I'm not actually sure what Swift does to abort.

I don't think I've seen an assertion before that logs "[Assert] …" so this doesn't seem to be any of the usual suspects like NSAssert or C's assert().

—Jens

Join xcode@apple-dev.groups.io to automatically receive all group messages.