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 heuristics testing, What is Heuristics Testing? Ans) Heuristics ...

What is Heuristics Testing? Ans) Heuristics Testing is the failure-directed testing.

Draw the context level dfd for the safe home software, Draw the Context lev...

Draw the Context level DFD for the Safe home Software. User commands Alarm type Telephone Number tone Sensor status Display Information

Explain in detail about integration testing, Explain in detail about Integr...

Explain in detail about Integration testing. It is a systematic method for constructing the program structure. Incremental integration - The program is constructed and

Iterative and evolutionary development, what is iterative and evolutionary ...

what is iterative and evolutionary developments? how iteration help in refining requirements

What is process involved in maturity levels in seis cmm, What is process in...

What is process involved in maturity levels in SEIs CMM. Level 1: Initial - a small number of processes are defined and individual efforts are taken. Level 2: Repeatable - T

Calculate the peak manning and average rate of software, Q. A software proj...

Q. A software project is planned to cost 95PY in a period of 1 year and 9 months. Calculate the peak manning and average rate of software them build up. Ans. Software project

Explain token count, Token count: -  A program is considered to be series o...

Token count: -  A program is considered to be series of tokens and if we count the number of tokens, some interesting results might be emerge. Tokens are classified as either opera

What is constructive cost model, Q. What is Constructive Cost Model? CO...

Q. What is Constructive Cost Model? COCOMO model denotes Constructive Cost Model. It is an empirical model basis on project experience. It is well-documented and independent mo

Explain good design, Design could mean to lots of things, but often refers ...

Design could mean to lots of things, but often refers to internal design or functional design. Good functional design is point to by software functionality can be traced back to cu

Use of test file generators in software engineering, Q. Use of Test file ge...

Q. Use of Test file generators in software engineering? Test file generators This creates a file of information that is used as the program and does so based on comments give

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