Proper way to display error alert during drawing from main thread

Sometimes while drawing from my main thread I have error conditions that I need to relay to the user, and often need to get the user to interact (enter text, press a button, etc) -- and then CONTINUE from inside the main thread drawing process that was interrupted.

However, the main thread doesn't like it when you try to draw while already drawing from within the main thread (I think it even throws an exception if you try).

Is there a canonical approach to handling errors that occur during drawing that require more sophisticated error handling?

What type of drawing do you mean. What type of error do you need to handle ? What call triggers the error ?

You do not interrupt the runloop that is drawing content. But maybe your code has some points at which it has to test for some condition and then may ask user before continuing ?

@Claude31 -- my Main thread is drawing the content of the window (quite complex). Sometimes -- rarely -- it may encounter errors in MY CODE related to fonts or layout issues. When this happens I need the user to OK sending an error report back to us. So we put up a couple of modal alerts (they might even be modal dialogs). I've read there's a way to allow these to draw on a secondary thread? Is that the right way to handle this kind of situation?

Proper way to display error alert during drawing from main thread

What platform is this on?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Proper way to display error alert during drawing from main thread
 
 
Q