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 utilization, Normal 0 false false false EN-IN ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Define object in software engineering, Q. Define Object in Software Enginee...

Q. Define Object in Software Engineering? Object:- An object is something which is capable of being seen, touched or sensed. Each object has certain distinctions or attributes

Computer science, Write a report that explains the agile principles for rap...

Write a report that explains the agile principles for rapid software development, and recommend and justify an appropriate method for adoption.

What do you mean by class, Q. What do you mean by class? A class is a t...

Q. What do you mean by class? A class is a template that specifies the properties of objects. Classes have an interface that consists of the operation a body which implements t

Objectives of data dictionaries, Objectives of Data dictionaries:- 1)  ...

Objectives of Data dictionaries:- 1)  A standard definition of all terms in a system, that is every item of data is uniquely identified and described. 2)  Easy cross-referen

How is the state diagram helpful to an engineer, Problem: a) Assume a w...

Problem: a) Assume a washing machine. List all possible states of the washing machine. Draw a state diagram showing also the events triggering the change of states where poss

What is throw-away prototyping, Throw-away prototyping Objective: ...

Throw-away prototyping Objective: The principal objective of this model is to validate or to derive the system needs. It is developed to decrease requirement risks.

Which type of software must not be automated, Which type of software must n...

Which type of software must not be automated? Following types of software must not be automated: - Incomplete/Unstable software since they are still undergoing changes -

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