When must a function throw an exception, Software Engineering

Assignment Help:

When must a function throw an exception?

A function must throw an exception when it's not able to fulfil its promise.

As soon as function detects a problem which prevents it from fulfilling its promise, it must throw an exception. If function is able to handle problem, recover itself and deliver promise, the exception shouldn't be thrown.

If an event occurs very frequently then exception handling isn't the best way to deal with it. It requires proper fixation.

 


Related Discussions:- When must a function throw an exception

List the pre-requisites for white-box testing, List the pre-requisites for ...

List the pre-requisites for white-box testing Pre-requisites for white-box testing are similar to black-box testing with one key difference: - During white-box testing, test

Developing prototype software, Introduction Energy consumer in the comp...

Introduction Energy consumer in the computer system is getting critical all around the globe now. Therefore, the ability to figure out the components that consume energy in sys

Timeline chart, how to make timeline chart for timetable generation system

how to make timeline chart for timetable generation system

Explain common coupling with example, Q. Explain Common coupling with examp...

Q. Explain Common coupling with example? Common coupling: General coupling is when two modules share the same global data (example a global variable). Changing of the shared

Evaluate mccabes cyclomatic complexity, Q. For the flow graph showed in fig...

Q. For the flow graph showed in figure compute McCabe's Cyclomatic Complexity. Ans: In this flow graph Number of regions are 5 hence the Cyclomatic complexity is = 5

What are the benefits of modular design, What are the benefits of modular d...

What are the benefits of modular design? Changes made during testing and maintenance becomes manageable and they do not affect other modules.

Software testing, Hello, I have an assignment and have to derive a regular ...

Hello, I have an assignment and have to derive a regular expression based on a CFG provided but i dont know how. please help.

What is test file generators and test harness systems, Q. What is Test file...

Q. What is Test file generators and test harness systems? Test file generators: This creates a file of information that is utilized as the program and does so based on commen

What is quality control, What is quality control? Ans) Quality control m...

What is quality control? Ans) Quality control means to preserve the quality of product by measuring their content , different physical parameters.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd