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 software maintenance, What is software maintenance? Changes to...

What is software maintenance? Changes to the software are made in response to altered requirements but the fundamental structure of the software remains stable.

Distinguish among verification and validation, Distinguish between verifica...

Distinguish between verification and validation. Verification is the set of activities that ensure that software properly implements a specific function. Validation is a differ

Define software testing, Define software testing? Software testing is a...

Define software testing? Software testing is a critical element of software quality assurance and shows the ultimate review of specification, design, and coding.

Explain acceptance testing and beta testing, Explain acceptance testing and...

Explain acceptance testing and beta testing.  Acceptance Testing and Beta testing : System tests are designed to validate a fully developed system to make sure that it meets

Performing validation testing, What are the conditions exists after perform...

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

The problems that are faced during maintenance of software, Discuss some of...

Discuss some of the problems that are faced during maintenance of software. The problems are:  -  Often another person or group of persons working over the years in isolat

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

Define behavioural modelling, Define Behavioural Modelling. The state t...

Define Behavioural Modelling. The state transition diagram shows the characteristics of a system by depicting its states and the events that cause the system to change state

Explain common coupling, Common coupling: Common coupling is when two modu...

Common coupling: Common coupling is when two modules share the similar global data (e.g. a global variable). Changing the shared resource implies changing all the modules using it

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