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 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

What is regression testing, What is regression testing? Regression test...

What is regression testing? Regression testing is the re-execution of some subject texts that have already been conducted to make sure that changes have not propagated unintend

What is the purpose of symbol table, Problem 1 . What is the purpose of Sym...

Problem 1 . What is the purpose of Symbol Table? Write a brief note on various Data structures used in implementing Symbol Tables Stating Purpose Writing note on various D

What do you mean by encapsulation, Q. What do you mean by Encapsulation? ...

Q. What do you mean by Encapsulation? Encapsulation:- An object is said to be encapsulate (hide) data and program. This signifies that the user cannot see the inside of the o

Database definition - micro cds/isis application, Database Definition: ...

Database Definition: There are four basic steps involved in defining a database. They are:  i)  Creating a Field Definition Table (FDT) : The possible content of data recor

Software metrices, 1. Take a look at the code and try to understand the lo...

1. Take a look at the code and try to understand the logic, particularly, the way scrambled words are disambiguated, i.e.., whether they are matched successfully against a correct

Explain top down design, Top down design: A top down design approach begin...

Top down design: A top down design approach begins by identifying the main modules of the system, decomposing them into their lower level modules and iterating unless the desired

Explain the modularity concept mean, What does Modularity concept mean? ...

What does Modularity concept mean? Software architecture embodies modularity; i.e. Software is named in to addressable components called modules, which are integrated finally.

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