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

Define the stress testing, Define the Stress testing: - It checks the r...

Define the Stress testing: - It checks the robustness of application. - It verifies that application consistently gives satisfactory performance under unfavorable and extrem

Differentiate between object oriented and function oriented, Differentiate ...

Differentiate between object oriented and function oriented design .  Function-oriented design relies on recognizing functions which transform their inputs to make outputs. I

Write sql code to make the changes, Assuming that all the tables have been ...

Assuming that all the tables have been created as given in the relational schema, write SQL code to make the following changes in the structure of the tables: (i) Make the empl

Important factors related to library storage operation, Important factors r...

Important factors related to library storage operation: It is essential to consider some important factors related to library and information storage and retrieval operations

Importance of a document type definition in xml, Question: (a) Describe...

Question: (a) Describe the purpose and importance of a Document Type Definition in XML. (b) Describe the difference between PCDATA and CDATA with respect to a DTD. (c)

Determine in detail about waterfall model, Determine in detail about Waterf...

Determine in detail about Waterfall model Waterfall model provides a sequential and systematic approach to software development and is better than build and fix approach. Howev

What is the use of cmm, What is the use of CMM? Capability Maturity Mod...

What is the use of CMM? Capability Maturity Model is used in assessing how well an organisation's processes permit to complete and manage latest software projects.

Determine the problems of software maintenance, Determine the problems of s...

Determine the problems of software maintenance Software maintenance has the below problems: i)  It is very cumbersome to analyse and understand code written by somebody.

What is requirements engineering, What is Requirements Engineering Req...

What is Requirements Engineering Requirements engineering is systematic use of proven techniques, principles and language tools for cost effective analysis, on-going evaluatio

What is software risk, A measure of the severity and probability of undesir...

A measure of the severity and probability of undesired effects. Often taken as the easy product of probability and consequence.

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