Questions tagged [runtimeexception]

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Virtual Machine.

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Virtual Machine.

1062 questions
39
votes
12 answers

Error inflating class android.support.design.widget.FloatingActionButton

My app crashed because Error inflating class android.support.design.widget.FloatingActionButton This is my code in the XML
Vanya Rachel
  • 1,329
  • 1
  • 18
  • 20
37
votes
17 answers

Error:Execution failed for task ':app:transformClassesWithDexForDebug' in android studio

I am moving my projects from eclipse to Android Studio. While running one of my app I get the following error. Not able to find any solution. I have enabled multidex as well. Error:Execution failed for task …
user1938357
  • 1,466
  • 3
  • 20
  • 33
36
votes
6 answers

java.lang.RuntimeException at android.app.ActivityThread.performLaunchActivity

From Google Play Console, java.lang.RuntimeException occurs without "Caused by:" The below log is copied from Google Play Console Crash log. This is for: Android 8.0, Android 8.1, Android 7.0, Android 7.1 java.lang.RuntimeException: at…
San Moohak
  • 369
  • 1
  • 3
  • 5
33
votes
5 answers

Java RuntimeException equivalent in C#?

Does C# have the equivalent of Java's java.lang.RuntimeException? (I.E. an exception that can be thrown without the necessity of being caught, or the program crashing when the exception is thrown.)
leeand00
  • 25,510
  • 39
  • 140
  • 297
33
votes
8 answers

How to wrap checked exceptions but keep the original runtime exceptions in Java

I have some code that might throw both checked and runtime exceptions. I'd like to catch the checked exception and wrap it with a runtime exception. But if a RuntimeException is thrown, I don't have to wrap it as it's already a runtime…
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
31
votes
2 answers

"RuntimeException: Performing pause of activity that is not resumed"

(I see a similar question on stackoverflow, but the answer there is not a true answer, and the context of the problem is a bit different too.) "java.lang.RuntimeException: Performing pause of activity that is not resumed" I develop a game…
Thomas Calc
  • 2,994
  • 3
  • 30
  • 56
30
votes
5 answers

Equivalent of IllegalArgumentException of Java in C++

In Java if an input argument to a method is invalid, we can throw an IllegalArgumentException (which is of type RuntimeException). In C++, there is no notion of checked and unchecked exceptions. Is there a similar exception in standard C++ which can…
Srikanth
  • 11,780
  • 23
  • 72
  • 92
26
votes
2 answers

Proper use of RuntimeException?

Possible Duplicate: In Java, when should I create a checked exception, and when should it be a runtime exception? When should I derive an exception from RuntimeException instead of Exception? A RuntimeException does not have to be declared in a…
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
26
votes
4 answers

Is it possible to throw a "RuntimeException" in Swift without declaring it?

I would like to throw an exception from some "deep" function, so it bubbles up to another function, where I want to catch it. f1 calls f2 calls f3 calls ... fN which may throw an error I would like to catch the error from f1. I've read that in Swift…
Ferran Maylinch
  • 10,919
  • 16
  • 85
  • 100
26
votes
8 answers

Differences between Runtime/Checked/Unchecked/Error/Exception

What are the Runtime exceptions and what are Checked/Unchecked Exceptions and difference between Error/Exception.Why these many types? Instead Java may simply follow a simple design(just try/catch all types) to handle an abnormal condition in a…
JavaUser
  • 25,542
  • 46
  • 113
  • 139
26
votes
2 answers

RuntimeException & Error

In the exceptions hierarchy, the descendants of RuntimeException and those of Error are runtime exceptions/errors. The difference between the two is: Those under RuntimeException are the ones caused by poor programming/design, and those of Error…
Roam
  • 4,831
  • 9
  • 43
  • 72
23
votes
6 answers

java.lang.RuntimeException: Failed to invoke public com.example.syncapp.MessageBase() with no args

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println(request.getParameter("msg").toString()); String data = request.getParameter("msg").toString(); Gson…
user1612863
  • 229
  • 1
  • 2
  • 5
23
votes
3 answers

Is it possible to catch all exceptions except runtime exceptions?

I have a statement that throws a lot of checked exceptions. I can add all catch blocks for all of them like this: try { methodThrowingALotOfDifferentExceptions(); } catch(IOException ex) { throw new MyCustomInitializationException("Class…
Rasto
  • 17,204
  • 47
  • 154
  • 245
22
votes
5 answers

Why runtime exception is unchecked exception?

Generally if any class extends Exception , it becomes checked exception. Runtime exception also extends Exception. Then how is it unchecked exception? Is it like they have a custom check in compiler for this special case? EDIT : I have proper idea…
Priyank Doshi
  • 12,895
  • 18
  • 59
  • 82
21
votes
2 answers

Set a menu item as checked from code

I have an Android application with the following menu item in one of the Activities (which concerns handling a list of names and mac numbers):
1
2
3
70 71