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 is assertion testing, A dynamic analysis method which inserts assertio...

A dynamic analysis method which inserts assertions about the relationship among program variables into the program code. The truth of the assertions is determined as the program im

Describe the various types of restructuring techniques, Describe the variou...

Describe the various types of restructuring techniques. (a) Code Restructuring: It is performed to yield a design that produces the similar function but with higher quality t

Why software maintenance is require, Why Software maintenance is require ...

Why Software maintenance is require Software maintenance is done due to the below factors. i)  To rectify the errors which are encountered during the operation of software.

Explain the evolutionary model, Explain the Evolutionary Model. Ideal f...

Explain the Evolutionary Model. Ideal for software products that have their feature sets redefined during development because of user feedback and other factors. The Evolutiona

Explain error, A discrepancy among a computed, observed, or calculated valu...

A discrepancy among a computed, observed, or calculated value or condition and the true, specified, or theoretically correct value or condition; and

What is operational testing, Testing conducted to consider a system or comp...

Testing conducted to consider a system or component in its operational environment. Contrast with development, testing,; testing, acceptance;

#title.help with labs for Rabbit 4000, I need help two thing 1-understand h...

I need help two thing 1-understand how can I programme rabbit 4000 2- do labs set for Rabbit 4000

Event management information system in uml, Company Universal Consulting is...

Company Universal Consulting is a large consulting firm that specializes in IT consulting services for the Healthcare industry. The company employs over 2,000 dedicated IT professi

Mca, encoded micro instruction vs unecoded micro instruction

encoded micro instruction vs unecoded micro instruction

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