`UncaughtExceptionHandler` is a [tag:java] interface defining the handlers invoked whenever a Thread throws an exception that is not caught by any `try` block. A class that implements this interface can be registered so that the programmer can control what should happen in this case.
Questions tagged [uncaughtexceptionhandler]
102 questions
0
votes
2 answers
Equivalent of UncaughtExceptionHandler of java in C# for UWP Apps
In java we have Thread.UncaughtExceptionHandler for handling the unhandled exceptions. How can I handle the unhandleded exception in C# UWP.
I am unable to use the AppDomain as it is not supported. Also, there are some references around Assemblies.…

krckumar
- 544
- 4
- 21
0
votes
1 answer
ApplicationEventMulticaster UncaughtExceptionHandler
I'm using Spring's ApplicationEventMulticaster.
How do I configure the uncaught error handling when listening to events?
public ApplicationEventMulticaster asyncApplicationEventMulticaster() {
SimpleApplicationEventMulticaster…

DD.
- 21,498
- 52
- 157
- 246
0
votes
1 answer
Is it possible to prevent or restart the main thread when uncaught exception is thrown
I currently have an app which launches a different Activity if the user has crashed multiple times. However, the app can still crash in this alternate activity due to background services / push services.
Is there a way to prevent the main thread…

cappicone
- 33
- 3
0
votes
1 answer
Starting a new thread on Exception using Uncaught Exceptional Handler
A runnable task parses incoming xml file and is invoked from a different class. Sometimes the parsing may fail and throw an exception. The task should be running even when exceptions occur. I tried restarting the same task in a new thread using…

Rk R Bairi
- 1,289
- 7
- 15
- 39
0
votes
1 answer
Intermittent Android app crash with no error logs despite UncaughtExceptionHandler
Difficult issue to explain here - I can't give a code example because if I knew where abouts in the code the issue is, I wouldn't need help. Anyway...
My application, very infrequently, bombs out with an "Unfortunately [Your awesome generally bug…

HomerPlata
- 1,687
- 5
- 22
- 39
0
votes
1 answer
UncaughtExceptionHandler issue
In the following code I am obtaining exception data in an released app. This app is not running in debug mode - it is running as a released app on lots of phones.
What I have here works just fine. It puts exception data into shared memory which I…

Dean Blakely
- 3,535
- 11
- 51
- 83
0
votes
1 answer
Global error handling for spring standalone application
I have a standalone spring application where one of my bean implementing UncaughtExceptionHandler and in main method calling Thread.setUncaughtExceptionHandler.
Is there any spring support for global error handling, I found a few options for spring…

Sankalp
- 2,030
- 7
- 30
- 41
0
votes
3 answers
Ereza CustomActivityOnCrash startActivity with Intent
I've been trying to implement an custom UncaughtExceptionHandler into my application and I've discovered the library Ereza/CustomActivityOnCrash.
I have added all the code as described in the README (https://github.com/Ereza/CustomActivityOnCrash)…

RheeBee
- 195
- 2
- 11
0
votes
1 answer
JavaFX: How to show error dialog when start method fails?
In my JavaFX application, I want to show an error dialog and exit the app whenever some unexpected exception occurs. So in my main-method I have set up a default uncaught exception handler before launching the…

user3237736
- 845
- 1
- 9
- 24
0
votes
1 answer
Catch exception with UncaughtExceptionHandler but show crash dialog
I've implemented an ExceptionHandler to prevent the app to start the activity that crashes and it works.
My Problem is that it does not display the error dialog anymore.
Here the code of the ExceptionHandler:
public class MyExceptionHandler…

Patric
- 342
- 4
- 19
0
votes
0 answers
why is my UncaughtExceptionHandler not catching StackOverflowError?
I am running a Java daemon and want to catch unhandled exceptions. So I wrote a class:
public class CodeineUncaughtExceptionHandler
implements UncaughtExceptionHandler {
private Logger log =…

oshai
- 14,865
- 26
- 84
- 140
0
votes
1 answer
How to get logcat in UncaughtExceptionHandler
I'm writing a custom exception handler that basically reports every crash of an application and i want to get logcat output after an exception occurs. That's the easy part, i just use
Runtime.getRuntime().exec("logcat -d");
But that only gives me…

Squeazer
- 1,234
- 1
- 14
- 33
0
votes
1 answer
Concrete example of a defaultUncaughtExceptionHandler
I've had the case several times where exception in futures would prove hard to track down (and already asked a question here about why some exception seemed never to happen and this question is not a dupe of my older question) and decided to try to…

Cedric Martin
- 5,945
- 4
- 34
- 66
0
votes
1 answer
catch exception on a form which is created by Assembly.CreateInstance() method Reflection
Form myForm = clsUIMethods.CreateFormInstance(iObjectAppId, sObjName, sFormCaption, sKey, toolCategory, sAccessibleDefaultActionDescription);
public Form CreateFormInstance(int objectAppID, string formName, string…

Muhammad VP
- 107
- 2
- 6
0
votes
0 answers
How do you get the thread HANDLE that threw an exception to an UnhandledExceptionFilter or a VectoredExceptionHandler?
Say you have the following global exception handlers/filters:
LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS exception)
{
return EXCEPTION_CONTINUE_SEARCH;
}
LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS exception)
{
…

Alexandru
- 12,264
- 17
- 113
- 208