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

Draw dfd for the given requirement, A store is in the business of selling p...

A store is in the business of selling paints as well as hardware items. A numeral of reputed companies supplies items to the store. New suppliers are able to also register with the

Explain functional testing, Functional testing is black-box type of testing...

Functional testing is black-box type of testing geared to functional needs of an application. Test engineers *should* do functional testing.

What is incremental testing, Incremental testing is fractional testing of a...

Incremental testing is fractional testing of an incomplete product. The aim of incremental testing is to give an early feedback to software developers.

What is throw-away prototyping, Throw-away prototyping Objective: ...

Throw-away prototyping Objective: The principal objective of this model is to validate or to derive the system needs. It is developed to decrease requirement risks.

Illustrate about clear box testing and ad-hoc testing, Clear box testing an...

Clear box testing and Ad-hoc Testing Clear box testing is white box testing which is a structural testing method. It needs understanding of the internal logic and flows of the

What is software bug, Explain Software Bug? Ans) A fault in a program wh...

Explain Software Bug? Ans) A fault in a program which origins the program to perform in an unintended or unanticipated manner.

What is code complete, Code Complete - Phase of development where func...

Code Complete - Phase of development where functionality is executed in entirety with only bug fixes remaining. - All functions from the functional specifications are alrea

What is recovery testing and security testing, What is recovery testing and...

What is recovery testing and Security testing  Recovery testing is system tests that bind the software to fail in a variety of ways and justify that recovery is correctly perf

How to compute the cyclomatic complexity, How to compute the cyclomatic com...

How to compute the cyclomatic complexity? The cyclomatic complexity can be computed by any one of the following ways. 1. The numbers of regions of the flow graph correspond

Open source software, what are the advantages of open source software?

what are the advantages of open source software?

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