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

Illustrate the symbols of a data flow diagram, Symbols of a data flow diagr...

Symbols of a data flow diagram  1. Data Flow Signifies the connectivity between various processes 2. Process   Performs some processing of input data 3. Ex

Write the importance of standards, Write the Importance of standards. E...

Write the Importance of standards. Encapsulation of best practice- avoids repetition of past mistakes. They are a framework for quality assurance processes - they include ch

What is stamp coupling, Q. What is Stamp coupling? Stamp coupling: St...

Q. What is Stamp coupling? Stamp coupling: Stamp coupling take places between module A and B when complete data structure is passed from one module to another. Since not ever

Explain cause effect graph, A Boolean graph connecting causes and effects. ...

A Boolean graph connecting causes and effects. The graph is mainly a digital-logic circuit (a combinatorial logic network) by using a simpler notation than standard electronics not

Differentiate between circuit switching and packet switching, Question: ...

Question: (a) Differentiate between circuit switching and packet switching. (b) Using an example, explain the main parts that form a URL (Uniform Resource Locator). (c)

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 are the advantages of horizontal partitioning, What are the advantages...

What are the advantages of horizontal partitioning? i. Software is must be easy to check. ii. Software is handy to maintain. iii. Create fewer side effects. iv. Softwa

What is stress testing and performance testing, What is stress testing and ...

What is stress testing and performance testing? A stress testing executes a system in a way that demands resources in abnormal quantity, volume or frequency. Performance te

What is non-intrusive testing, What is Non-intrusive Testing? Testing th...

What is Non-intrusive Testing? Testing that is transparent to the software under test; i.e., testing that does not alter the timing or processing characteristics of the software

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