Phase 3 Error Handling and File Input and Output (DB)
Phase 3 DB9-4-14
In this Discussion board you will know the advantages and disadvantages of testing for error conditions as compared to using exception handling when performing input or output. And the mystery of why almost all programmers, in almost all cases, moved to using exception handling input or output. I will explain other situations other than input or output you might find exception handling useful. The advantages of automated testing is that the tests are reliable to the point that same test is ran precisely the same every time, so there is no room for human error. The software can run this test repeatedly with no problems. You can customize the tests to bring out hidden information from the application. This some high quality software that lets you run more tests in less time with fewer resources. The disadvantages of automated is that you have to be very proficient to write with automated test. Another issue would be debugging the test scripts. It can cause deadly consequences if any error is presented. The test maintenance is very expensive for playback methods. The reason programmers move to using exception handling because with java it helped them with bad data and common input files. It also allows them to create applications that can resolve exceptions. The 2 ways they can deal with exception one to write code to elegantly handle the exception, in the section where an exception may occur. The other is to bypass the exception.
It is useful to use exception when you tried to create a file and there was not enough space on a disk then it would be used to create that space. But also it is said that exception should never be accepted by a respectable programmer. It is expensive to use because the run time will unwind the stack until it finds an appropriate exception handler the can handle it. I think it is not...
Please join StudyMode to read the full document