answersLogoWhite

0

separating error handling code from 'regular' code

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

What is exception handling in object oriented languages?

Exception is a event which can interrupt a normal flow of your program. In other way, exception is a abnormal condition which can occur during the execution of a program. Yes , we can handle exceptions through try, catch, finally, throw and throws.


Why use throw in java in compare try-catch?

we use throws in our program so that we dont need to write try & catch block & to avoid the exception


What is the ICT Technician password for the 2014 laptops given by Kamla?

The program codes are not available outside the provider's security. You need to contact the issuer.


Explain about exception handling with multiple exception?

Exception handling in Java is done through a try-catch-finally block. The "try" block of code is where you put the code which may throw an exception. The "catch" block of code is where you put the code which will execute after an exception is thrown in the try block. This is often used to display an error message, or to mitigate problems caused by the exception. The "finally" block is where you put code that you want to execute after the try and catch blocks have been processed. // example code for catching exception while reading from a file try { // this line of code can throw a FileNotFoundException FileReader in = new FileReader("myfile.txt"); // this line of code can throw an IOException in.read(); } catch(FileNotFoundException ex) { // catch first exception type System.err.println("Cannot find myfile.txt!"); } catch(IOException ex) { //catch second exception type System.err.println("Cannot read from myfile.txt!"); } finally { // no matter what we want to close the file, so do it here // however, this line can also cause an exception, so we need to catch that, too try { in.close(); catch(IOException ex) { // not much we can do about an exception that occurs here } }


What can your program do with the exception object that a catch clause receives?

well if you read ch11 like u should, then maybe mis 331 would come easier and u would not need to google the answer

Related Questions

What is the need of management by exception?

Exception management is the practice of investigating, resolving and handling such occurrences by using skilled staff and software tools. Good exception management can contribute to efficiency of business processes.


Can program development be done by a program?

Yes and no, program development works in programming codes which are specifically made for humans to be entered, a program can write these programming codes too. The thing is, you would need to write the programming codes yourself before the program can use it in program development. If a program could invent the wheel, then you still need to invent that wheel before the program can. Or atleast until the thinking of the human brain can be translated into mere programming code.


What is exception handling in object oriented languages?

Exception is a event which can interrupt a normal flow of your program. In other way, exception is a abnormal condition which can occur during the execution of a program. Yes , we can handle exceptions through try, catch, finally, throw and throws.


How do you make a operating system?

You need how to program and you have to put in codes. Then you know how to make one.


GE 24914 Universal Remote Control codes for 20 in Emerson TV?

I'm trying to program the remote to a Sanyo TV need codes loss instructions


How do you program keyless entry on a 1996 grand am?

bring it to a dealer or a shop that puts them in you need a special computer and codes


Where are the cyberhome remote codes for sharp ga035sb universal remote?

i need program instructions or sharp ga035sb univer remote


Why use throw in java in compare try-catch?

we use throws in our program so that we dont need to write try & catch block & to avoid the exception


What is the ICT Technician password for the 2014 laptops given by Kamla?

The program codes are not available outside the provider's security. You need to contact the issuer.


How to you program codes in GPT universal remote control RM-788?

To program codes in a GPT universal remote control, RM-788, first you need to know the make and model of your television set. Then you find that code number on the pamphlet that came with the remote and enter it on the remote.


Does gold need special handling?

yes gold needs special handling


What are the foxpro commands in making a program?

There are lots of FoxPro command that you can do or make. But it is advisable to take up tutorials and hands on programming. Before making a program, you need of course to make a form, reports, menu, classes, codes, database, tables. Then you need to built it.