answersLogoWhite

0


Best Answer

There is no catch block that names either the class of exception that has been thrown or a class of exception that is a parent class of the one that has been thrown, then the exception is considered to be unhandled, in such condition the execution leaves the method directly as if no try has been executed

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

When an exception is thrown in a try block and is caught by a matching catch block, the exception is considered to have been handled. Or when an exception thrown by a method is caught by the calling method and handled, an exception can be considered handled

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When do you say an exception is handled?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is exception handling implicit or explicit?

In Java, Exception Handling is Explicit. The Programmer has to write code that will ensure that the exceptions are caught and appropriately handled


What is exception and give a simple example in java programming?

Exception is a situation in Java wherein the system is behaving in a not-so-correct way or rather the system is behaving in an erroneous way. Exceptions are handled using try-catch blocks. Ex: try { int x = 10/0; } catch (Exception e) { e.printStackTrace(); } Here we are performing an illegal operation by dividing 10/0 which will throw a numeric exception which will be caught and handled inside the catch block


Describe the JAVA throwable class hierarchy and types of exceptions?

In Java there are two main types of Exceptions. * Checked Exceptions - The ones that can be checked & handled in our code. Ex: I/O Exception, SQL Exception etc. In most cases, the compiler itself forces us to catch & handle these exceptions * Un-checked Exceptions - The ones that we cannot & should not handle in our code. Ex. Null Pointer Exception The java.lang.Throwable is the super class of all errors and exceptions in Java. Only objects of this class can be thrown & caught and handled by try-catch blocks. Ex: try { ..... ..... } catch (Exception e){ ... } finally { ... }


What is the implication of catching all the exceptions with the type Exception?

though catching exceptions is a good practice inside java code, catching all exceptions of the type exception is not the best way to go. Specific exceptions need to be caught instead of the generic Exception being caught. Also, different types of exceptions need to be handled separately.


What happens when raised exception is not caught by catch block?

A non-caught exception is propagated out of the local catch block into the next catch block, daisy chaining to the outermost catch block in the run-time library, where it will be handled by abending the program.

Related questions

How do you spell accption?

The spelling is "exception" (an instance treated or handled differently).


Is exception handling implicit or explicit?

In Java, Exception Handling is Explicit. The Programmer has to write code that will ensure that the exceptions are caught and appropriately handled


What Romans have slaves?

It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.It's safe to say that most of the Romans had slaves with the exception of the very poor.


What is exception and give a simple example in java programming?

Exception is a situation in Java wherein the system is behaving in a not-so-correct way or rather the system is behaving in an erroneous way. Exceptions are handled using try-catch blocks. Ex: try { int x = 10/0; } catch (Exception e) { e.printStackTrace(); } Here we are performing an illegal operation by dividing 10/0 which will throw a numeric exception which will be caught and handled inside the catch block


Difference between checked and unchecked exception?

Checked exceptions are exceptions which need to be handled explicitly. These are the ones which require a try-catchblock or a throws keyword.Unchecked exceptions are exceptions which have no obligation to be handled. A NullPointerException is one common example.


Describe the JAVA throwable class hierarchy and types of exceptions?

In Java there are two main types of Exceptions. * Checked Exceptions - The ones that can be checked & handled in our code. Ex: I/O Exception, SQL Exception etc. In most cases, the compiler itself forces us to catch & handle these exceptions * Un-checked Exceptions - The ones that we cannot & should not handle in our code. Ex. Null Pointer Exception The java.lang.Throwable is the super class of all errors and exceptions in Java. Only objects of this class can be thrown & caught and handled by try-catch blocks. Ex: try { ..... ..... } catch (Exception e){ ... } finally { ... }


What is checked exception?

A compiler for the Java programming language checks, at compile time, that a program contains handlers for checked exceptions, by analyzing which checked exceptions can result from execution of a method or constructor. For each checked exception which is a possible result, the throws clause for the method or constructor must mention the class of that exception or one of the superclasses of the class of that exception. This compile-time checking for the presence of exception handlers is designed to reduce the number of exceptions which are not properly handled.


What is the implication of catching all the exceptions with the type Exception?

though catching exceptions is a good practice inside java code, catching all exceptions of the type exception is not the best way to go. Specific exceptions need to be caught instead of the generic Exception being caught. Also, different types of exceptions need to be handled separately.


What happens when raised exception is not caught by catch block?

A non-caught exception is propagated out of the local catch block into the next catch block, daisy chaining to the outermost catch block in the run-time library, where it will be handled by abending the program.


How exception handling differs in C plus plus and Java?

Exception handling is largely the same for both. The only real difference is that C++ has no 'finally' clause which always executes whether an exception occurs or not. Another difference is that Java throws exceptions and errors, but errors cannot be handled since programs cannot handle errors -- such as the JVM out of memory error.


Is this run time checking mechanism done by c plus plus?

There is no such thing as a runtime checking mechanism in C++. The compiler can only catch compile time errors. You must provide any additional checks yourself, to handle any exceptions that may occur at runtime. Failure to handle an exception results in an exception error at runtime. The end result is that the program crashes but, if debug information is available, you can easily locate the source of the exception and thus determine how best to provide a handler for it. But this mechanism is not handled by C++ itself, it is handled by the debugger.


How can you convince the people not to use drugs?

just say "no" to drug. This should be handled by professional.