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

Software Engineering environments, 1.1 Discuss possible ramifications of th...

1.1 Discuss possible ramifications of these opposing objectives on the project. What would you do if you were the manager?

What is data modelling, What is data modelling? Data modeling is the ba...

What is data modelling? Data modeling is the basic step in the examine modeling. In data modeling the data objects are examined independently of processing. The data model s

What is software engineering, What is software engineering? Software en...

What is software engineering? Software engineering is a discipline in which theories, process and tools are applied to develop professional software.

Why do dns root servers hold entries for two-level, QUESTION - Name Service...

QUESTION - Name Services (a) Illustrate with help of a diagram the results of a DNS lookup and an ARP lookup assuming we are using IPv4. (b) Why do DNS root servers hold en

Define sandwich testing, Define sandwich testing. Testing joins the ide...

Define sandwich testing. Testing joins the ideas of bottom-up and top-down testing by explaining a certain target layer in the hierarchy of the module.

Span and average span size of a program, Q. Explain Span and average span s...

Q. Explain Span and average span size of a program? Span dimension indicates the number of statements that pass between successive uses of a variable. For illustration in the f

Determine the use of architectural design, What is the use of Architectura...

What is the use of Architectural design? The Architectural design defines the relationship between major structural elements of the software, the "design patterns" that may be

What are the roles of glass-box and black-box testing tools, What are the r...

What are the roles of glass-box and black-box testing tools? Glass Box (or white box) testing is the method of giving i/p to the system and checking how the system processes i/

Software testing, Discuss the limitations of software testing. How do we sa...

Discuss the limitations of software testing. How do we say that complete testing is impossible?.

What are the testing strategies for conventional software, What are the var...

What are the various testing strategies for conventional software? i. Unit testing ii. Validation testing. iii. Integration testing. iv. System testing.

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