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

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

E-R diagram, Draw an E-R diagram for the following situation: an account is...

Draw an E-R diagram for the following situation: an account is a relationtion between cutosmer and bank. A customer had a name.

What are the different types of cohesion, What are the different types of C...

What are the different types of Cohesion? i. Coincidentally cohesive -The modules in which the set of tasks are related with each other loosely then such modules are called as

Explain test procedure, Explain Test Procedure? Ans) The formal or infor...

Explain Test Procedure? Ans) The formal or informal process that will be followed to execute a test. This is usually a written document that permits others to implement the test

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;

What is syntax, 1) The relationship between characters or groups of charact...

1) The relationship between characters or groups of characters independent of their meanings or the manner of their interpretation and use; 2) The formation of expressions in a

What is stochastic testing, Stochastic testing is the similar as "monkey te...

Stochastic testing is the similar as "monkey testing", but stochastic testing is a lot more technical sounding name for the similar testing process.

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