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 integration testing, What is Integration testing: - This test i...

What is Integration testing: - This test is performed to determine the interfaces among system components, interactions between the application and the hardware, file system, a

Task set, task set for a project plan

task set for a project plan

Why we need restructuring techniques, Q. Why we need restructuring techniqu...

Q. Why we need restructuring techniques? The restructuring helps in maintaining a program in the following ways: (a) Programs have higher excellence better documentation l

Define the alpha testing and beta testing, Alpha testing and Beta testing ...

Alpha testing and Beta testing Alpha testing is conducting acceptance testing in the environment where the application was formed. It is done by the customer. Beta testing is c

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

Explain different recording modes, Explain different recording modes. T...

Explain different recording modes. There are two type of recording modes: context sensitive and analog. - Context Sensitive - identifies GUI objects and records operations

Srs, Why SRS document is also called as boack-box specification of a system...

Why SRS document is also called as boack-box specification of a system

Diff. b/w IT & CSE TRADE, Hello I want to know the actual difference b/w in...

Hello I want to know the actual difference b/w information technology & computer science & engineering ? Thanks

Define process specification, Define Process Specification. Process Sp...

Define Process Specification. Process Specification is used to explain all flow model processes that appear at the final level of refinement. Check & Convert pressure Ch

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