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 meant by system requirements, What is meant by System Requirements ...

What is meant by System Requirements Set out the system constraints and services in well explained. Serves as a contract among the system buyer & the system developer.

Explain different phases of spiral model, Q. Explain Different Phases of sp...

Q. Explain Different Phases of spiral model? 1) Planning: In this phase the objectives alternatives as well as constraints of the project are determined or documented. The ob

Explain productivity and difficulty, Productivity and difficulty Produ...

Productivity and difficulty Productivity refers to metrics and measures of output from production processes, per unit of input. Productivity P may be conceived of as a metric

What is maintenance, Define maintenance. Maintenance is defined as the ...

Define maintenance. Maintenance is defined as the procedure in which changes are executed by either modifying the existing system's architecture or by adding new mechanism to t

DFD AND DATA DICTIONARY, Hoosier Burger''s food ordering system dfd and dat...

Hoosier Burger''s food ordering system dfd and data dictionary

Define software process, Define software process. Software process is e...

Define software process. Software process is explained as the structured set of activities that are need to develop the software system.

Models, what are draw backs or disadvantages of waterfall model

what are draw backs or disadvantages of waterfall model

What is interface analysis, Checks the interfaces among program elements fo...

Checks the interfaces among program elements for consistency and adherence to predefined axioms or rules.

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