Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Global exception handler

Is there anyway to implement a global exception handler for iPhone apps such that exceptions, instead of silently crashing the app, could allow for some sort of message?

I can understand if it's not do-able since the program may be in an inconsistent state, but it'd be nice to at least tell users "Sorry - something went wrong!"

Thanks!

like image 674
Mark Avatar asked Dec 03 '10 00:12

Mark


People also ask

What is global exception handler?

The Global Exception Handler is a type of workflow designed to determine the project's behavior when encountering an execution error. Only one Global Exception Handler can be set per automation project.

How do I create a global error handler?

Steps for phase 2 implementation: Defining “Global Error Handler Configuration” Step 1: Select the “Global Elements” tab in Anypoint Studio. Step 1b: The “Global Configuration Elements” panel will appear. Step 2: Select the “Create” button from the “Global Configuration Elements” panel.

How does global exception handler work in spring boot?

Exception HandlerThe @ExceptionHandler is an annotation used to handle the specific exceptions and sending the custom responses to the client. Define a class that extends the RuntimeException class. You can define the @ExceptionHandler method to handle the exceptions as shown.

How does net core handle global exception?

Use the UseExceptionHandler middleware in ASP.NET Core So, to implement the global exception handler, we can use the benefits of the ASP.NET Core build-in Middleware. A middleware is indicated as a software component inserted into the request processing pipeline which handles the requests and responses.


1 Answers

Check this question for the answer. It seems to indicate that you'll be getting junky stack traces, but you definitely can set a global exception handler. Good luck!

like image 160
Sam Ritchie Avatar answered Oct 15 '22 11:10

Sam Ritchie