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 a database administrator, Test Build Managers, System Administrator...

Test Build Managers, System Administrators and Database Administrators deliver new software versions to the test environment, install the application's software and apply software

Threads, what resources are used when a thread is created ?

what resources are used when a thread is created ?

What is validation testing, What are the conditions exists after performin...

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

What is a cohesive module, What is a cohesive module? A cohesive module...

What is a cohesive module? A cohesive module performs only "one task" in software process with little interaction with other modules. In other words cohesive module performs on

What is class level methods, What is Class Level Methods? Ans) A class (...

What is Class Level Methods? Ans) A class (and its operations) is the module mainly concentrated on in OO environments. From here it should increase to other classes and sets of

Define encapsulation, Encapsulation An object expresses the data and i...

Encapsulation An object expresses the data and information it contains and supports a well described abstraction. Encapsulation leads to the separation of the interface and ex

Compare the productivity and difficulty, Q. Compare the Productivity and di...

Q. Compare the Productivity and difficulty? Productivity refers to metrics as well as measures of output from production processes per unit of input. Productivity P perhaps c

Numerical analysis, Use the Newton divided-di_erence method to construct in...

Use the Newton divided-di_erence method to construct interpolating polynomials of degree one, two, and three for the following data. Approximate f(0.18) using each of the polynomia

What is oo function testing, Function testing of OO software is no dissimil...

Function testing of OO software is no dissimilar than validation testing of procedural software. Client involvement is generally part of this testing stage. In OO environment use c

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