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

Write down the schema to represent the current system state, Question: ...

Question: Consider the University modular degree scheme where students choose a selection of modules from a large menu. Here we have the basic types [PERSON, MODULE], the set o

Explain acceptance testing and beta testing, Explain acceptance testing and...

Explain acceptance testing and beta testing.  Acceptance Testing and Beta testing : System tests are designed to validate a fully developed system to make sure that it meets

Explain the software quality assurance, Software Quality Assurance and Soft...

Software Quality Assurance and Software Quality Control SQA verifies if the process that is followed to form a product is effective and does not have process defects while SQC

Explain network switching subsystem in gsm, Question: (a) (i) What are...

Question: (a) (i) What are the main components of the Network Switching Subsystem in GSM? (ii) What are the main functions of the Network Switching Subsystem? (b) What

Database management systems, Database Management Systems: These are es...

Database Management Systems: These are essentially programming frameworks, and can offer good storage and retrieval systems. They are mainly intended for programmers to intera

Different phases of spiral model, Four Different Phases of spiral model are...

Four Different Phases of spiral model are: 1) Planning  2) Risk analysis 3) Development 4) Assessment

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)

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.

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