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

Explain regression testing, Question 1 Explain Iterative Development Model...

Question 1 Explain Iterative Development Model in detail Question 2 What is statistical testing? What are the steps involved in statistical Testing Question 3 Explain wh

Discuss the functions of a records manager, QUESTION 1 Give a brief ove...

QUESTION 1 Give a brief overview of the National Archives of Mauritius and elaborate on the services it offers to its users. QUESTION 2 Distinguish between preservation

What is assertion testing, A dynamic analysis method which inserts assertio...

A dynamic analysis method which inserts assertions about the relationship among program variables into the program code. The truth of the assertions is determined as the program im

Explain software measurement, Software measurement Software measuremen...

Software measurement Software measurement is anxious with deriving a numeric value for an attribute of a software product or process. This permits for objective comparisons

What is program control instruction, What is Program Control Instruction ...

What is Program Control Instruction A program control type of instruction, when implemented, may change the address value in the program counter and cause the flow of control t

Software Testing Methodologies, Write a program and identify DU path for Te...

Write a program and identify DU path for Telecom domain

Structured analysis and structured design, Differentiate between structured...

Differentiate between structured analysis and structured design.  The aim of structured analysis is to transform the textual explanation of a problem into a graphic model. Duri

What are the benefits of using stored procedures, What are the benefits of ...

What are the benefits of using Stored Procedures? - They help in reducing network traffic and latency which in turn boosts application performance. - They assist in promotin

Explain spiral model, Explain Spiral model The spiral model is separ...

Explain Spiral model The spiral model is separated into number of frame works. These frameworks are indicated by task regions. Usually there are six task regions. In spir

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