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

Define the prototyping model, Define the Prototyping Model In this mod...

Define the Prototyping Model In this model, a working model of actual software is developed originally. Prototype is just like a sample software having low reliability and les

Discuss in detail about cocomo model, Discuss in detail about COCOMO model....

Discuss in detail about COCOMO model. Constructive Cost Model. Software cost estimation gives the opportunity to estimate of how much months a man take to develop a softw

Who is a stake holder for a software project, Q. Who is a stake holder for ...

Q. Who is a stake holder for a software project? [Stake holder :- something or somebody with direct interest:  a group or person with a direct interest, investment or involvem

What is fault-based testing, 1. Testing that employs a test data selection ...

1. Testing that employs a test data selection method designed to obtain test data capable of demonstrating the absence of a set of pre-specified faults, typically, frequently happe

What are the types of software maintenance, What are the types of software ...

What are the types of software maintenance? Corrective maintenance - Means the maintenance for correcting the software faults. Adaptive maintenance - Means maintenance f

What is a document version, What is a document version? Ans) A document ...

What is a document version? Ans) A document version is a first release (or complete re-release) of a document, as opposed to a revision resulting from issuing change pages to a

Two software characteristics, Discuss any two software characteristics. ...

Discuss any two software characteristics. Software is not manufactured : The life of software is from method exploration to the retirement of the software product. It is one t

Discuss the impact of "information era", Question 1 Discuss the impact of ...

Question 1 Discuss the impact of "information era" Question 2 Explain whether the linear sequential model of the software process is an accurate reflection of software developme

What is product metrics, Product metrics: explain the characteristics of t...

Product metrics: explain the characteristics of the product such as size, complexity, design features, performance, efficiency, reliability, portability, etc.

What is technical review, A technical review is the review that refers to c...

A technical review is the review that refers to content of the technical material being reviewed.

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