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

Describe the various types of coupling, Describe the various types of coupl...

Describe the various types of coupling? i. Data coupling - The data coupling is possible by parameter passing or data interaction. ii. Control coupling - The modules share c

Prolog, package(''python'', ''2.6.5''). package(''python'', ''2.5.4''). pac...

package(''python'', ''2.6.5''). package(''python'', ''2.5.4''). package(''python'', ''1.5.2''). package(''python'', ''3.1.0''). and I already have these functions that provide me:

Define the level 1 of maturity model, Define the Level 1 of maturity model ...

Define the Level 1 of maturity model At this maturitylevel,software is developed an ad hoc basis and nonstrategic technique is used for its development. Success of developed s

What are the main objectives of reverse engineering, What are the main obje...

What are the main objectives of reverse engineering? The main objectives of the reverse Engineering process are: (i) It helps the companies to understand the difficulties

Explain the per-action modeof QTP, Explain the Per-action modeof QTP ...

Explain the Per-action modeof QTP - Best used in below cases: - When creating simple record and run tests when there is just one or very few tests which correspond to int

State the defined level of maturity model, Level 3 (Defined) The org...

Level 3 (Defined) The organisation satisfies all the requirements of level-2. Atthis maturity level, the softwaredevelopmentprocesses arewell defined, managed and documented

Illustrate evolutionary prototyping, Illustrate Evolutionary prototyping ...

Illustrate Evolutionary prototyping Objective: The main objective of this model is to show the working system to the end-user. Example-AI systems. Advantages

What is cmmi framework, What is CMMI framework? The CMMI framework is t...

What is CMMI framework? The CMMI framework is the present stage of work on process assessment and improvement that started at the Software Engineering Institute in the 1980s.

What do you mean by software engineering, Q. What do you mean by Software E...

Q. What do you mean by Software Engineering? What is the use of Software Engineering? Ans) Software engineering is engineering for software development. A simple program can be

What is statement testing, Testing to satisfy the criterion that every stat...

Testing to satisfy the criterion that every statement in a program be implemented at least once during program testing.

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