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 are the merits of incremental model, What are the merits of incrementa...

What are the merits of incremental model? i. The incremental model can be adopted when there is less number of people included in the project. ii. Technical risks can be ma

Explain productivity and difficulty, Productivity and difficulty Produ...

Productivity and difficulty Productivity refers to metrics and measures of output from production processes, per unit of input. Productivity P may be conceived of as a metric

Explain document interchange standards, Document interchange standards ...

Document interchange standards Interchange standards permit electronic documents to be exchanged mailed, etc.  Documents are produced using dissimilar systems and on differe

What are the approaches of integration testing, What are the approaches of ...

What are the approaches of integration testing? The integration testing may be performed using two approaches. 1. The non-incremental testing. 2. Incremental testing.

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