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

What are the reasons behind to perform white box testing, What are the reas...

What are the reasons behind to perform white box testing? There are three main reasons behind performing the white box testing.  1. Programmers may have some incorrect assum

What are the benefits of prototyping, What are the benefits of prototyping?...

What are the benefits of prototyping? i. Prototype serves as a basis for deriving system specification. ii. Design quality can be improved. iii. System can be maintained

What is data modeling, What is data modeling? Data modeling is the basi...

What is data modeling? Data modeling is the basic step in the analysis modeling. In data modeling the data objects are explained independently of processing. The data model sho

What is prototype, What is Prototype Prototype is developed so that cu...

What is Prototype Prototype is developed so that customers, developers and users can learn more about problem. Hence prototype serves as a mechanism for identifying software r

What are the benefits of horizontal partitioning, What are the benefits of ...

What are the benefits of horizontal partitioning? i. Software that is simple to test. ii. Software that is simpler to maintain. iii. Propagation of fewer side effects.

What is open box testing, Open box testing is similar as white box testing....

Open box testing is similar as white box testing. It's a testing approach that consider the application's program structure, and derives test cases from the application's program l

What condition exists after performing validation testing, What are the con...

What are the conditions exists after performing validation testing? After performing the validation testing there two situations arise. The function or performance characterist

Explain the waterfall model, Explain the waterfall model. Explain why it is...

Explain the waterfall model. Explain why it is more advantageous than adhoc methods. Ans Waterfall Model: 1.The waterfall model is a chronological software development p

State the cocomo model, What is COCOMO model? COCOMO stands for COnstru...

What is COCOMO model? COCOMO stands for COnstructive COst MOdel. It is used for cost Effort=a * KDLOCb Where a and b are two parameters of the model whose specific values

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