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 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

Resource usage with reference to software reliability models, Q. Resource u...

Q. Resource usage with reference to software reliability models? Resource usage: It is linearly proportional to implementation time t and mean failures experienced μ. Let Xr

implicit and explicit conceptual model, difference between implicit and ex...

difference between implicit and explicit conceptual model

What is ripple effect, Q. What is ripple effect? How does it affect the sta...

Q. What is ripple effect? How does it affect the stability of a program? Ans. The ripple effect is a term used to explain a situation where like the ever expanding ripples

Iterative enhancement model, Iterative Enhancement Model Iterative Enha...

Iterative Enhancement Model Iterative Enhancement Model: This model has the similar phases as the waterfall model, but with fewer restrictions. Normally the phases happen in th

What is coupling, What is coupling? Coupling is the measure of intercon...

What is coupling? Coupling is the measure of interconnection between modules in a program structure. It depends on the interface complexity among modules.

Differentiate between smoke testing and sanity testing, Differentiate betwe...

Differentiate between smoke testing and sanity testing. -Smoke testing verifies all areas of application; sanity testing recognizes one or few areas only. -Smoke testing is

Illustrate the concept of a software bus in corba, QUESTION (a) Illustr...

QUESTION (a) Illustrate the concept of a software bus in CORBA (b) Taking an example of your own, explain how component-based software engineering can allow very rapid softw

What is equivalence class testing, Q. What is Equivalence class testing? ...

Q. What is Equivalence class testing? Equivalence class testing is based on the partitioning the input domain of a program into a number of equivalence classes so that the test

Difference between module coupling and module collection, What is the diffe...

What is the difference between module coupling and module collection? Cohesion is the property of a one module and can be defined as glue that keeps the data elements within a

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