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 walk-through, A walk-through is an informal meeting for information...

A walk-through is an informal meeting for informational purposes or evaluation.

Define software testing, Define software testing? Software testing is a...

Define software testing? Software testing is a critical element of software quality assurance and shows the ultimate review of specification, design, and coding.

When we need re-engineer, Q. When we need Re-Engineer? When the sys...

Q. When we need Re-Engineer? When the system changes are mainly confined to part of the system then re-engineer that part. When hardware or else software support become

Define requirement engineering, Define Requirement Engineering. Require...

Define Requirement Engineering. Requirement Engineering is a process that includes all of the activities needed to create and maintain a system requirements document. The fo

Software testing, 1. Answer the following questions for the method search()...

1. Answer the following questions for the method search() below: public static int search (List list, Object element) // Effects: if list or element is null throw NullPointerExcept

Explain quick-fix model, Explain Quick-fix Model Quick-fix Model : Thi...

Explain Quick-fix Model Quick-fix Model : This is the easiest model used for the maintenance of the software. In this model changes at the code level are made as early as poss

What is software measure, What is software measure? A software measure ...

What is software measure? A software measure is a mapping from a set of objects in the software engineering world information a set of mathematical construct like numbers or ve

Transform maping., using a dfd and a processing narrative,describe computer...

using a dfd and a processing narrative,describe computer based system that can distinct transform flow characteristics.Define flow boundaries map the dfd into a software architectu

What is incremental analysis, Incremental analysis happens when (partial) a...

Incremental analysis happens when (partial) analysis may be performed on an incomplete product to permit early feedback on the development of that product.

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