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

Explain the limitations of testing, Q. Explain the limitations of testing? ...

Q. Explain the limitations of testing? Ans: Though testing is an significant part of system development and leads to a verified, valid and efficient system it as well faces s

#, Write the algorithm to print at list of numbers from 1 to 5 and there s...

Write the algorithm to print at list of numbers from 1 to 5 and there square

Outsourcing software, discuss how your organization can take advantage of o...

discuss how your organization can take advantage of outsourcing its IT systems/functions

What is a boundary value analysis, What is a boundary value analysis? A...

What is a boundary value analysis? A boundary value analysis is a testing method in which the elements at the edge of the domain are selected and tested. It is a test case desi

What are the related data items, What are the Related data items Relate...

What are the Related data items Related data items captures details of related attributes. Range of values store total possible values of that data. Data structure definition c

Difference between module coupling and module collection, Q. What is the di...

Q. What is the difference between module coupling and module collection? List different types of coupling and cohesion. Ans : Cohesion is the property of a single module as we

What is performance testing, What is performance testing? Performance t...

What is performance testing? Performance testing is intended to test the run-time performance of software within the context of an integrated system.

Flow chart, desidn a complete flow chart diagram ,which ask the user to inp...

desidn a complete flow chart diagram ,which ask the user to input the rate of diesel and quantity of diesel consumed.after calculate the total amount of diesel consumed and display

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