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 in detail the design concepts, Explain in detail the design concept...

Explain in detail the design concepts. Abstraction Functional abstraction Data abstraction Control abstraction Information hiding Every module in

Define software reliability, Define software reliability. What is the diffe...

Define software reliability. What is the difference between hardware & software reliability? Ans: Software reliability is the possibility that software will provide failure-f

Implicit and an explicit conceptual model, What is the difference among an ...

What is the difference among an implicit and an explicit conceptual model?

Draw an entity relationship diagram, Problem: (a) Draw an Entity Relat...

Problem: (a) Draw an Entity Relationship Diagram for the given case study. Show entities and relationships on the diagram (attributes should not be shown). Cardinality and op

Determine the boundary value analysis, What is a boundary value analysis? ...

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

Operating systems, Compare and contrast two operating systems

Compare and contrast two operating systems

Explain the concept of decision tables, Explain the concept of Decision Tab...

Explain the concept of Decision Tables Decision table models complex logic into precise yet compact way. A decision table lists causes and effects in a matrix. Every column

What is mutation testing, Mutation testing is type of software testing wher...

Mutation testing is type of software testing where our goal is to make mutant software fail, and therefore demonstrate the adequacy of our test case.

Define about the erroneous data - Test data, Define about the erroneous dat...

Define about the erroneous data - Test data Abnormal/erroneous data  -  This is data outside the limits of validity/acceptability and must cause an error message to be g

Explain acceptance testing and beta testing, Explain acceptance testing and...

Explain acceptance testing and beta testing.  Acceptance Testing and Beta testing : System tests are designed to validate a fully developed system to make sure that it meets

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