Computer Science, asked by aravindjegan71, 1 year ago

Hello , what is used in specification in cpp


aravindjegan71: Enda enaikkum Malayalam ariyum
alia2000chadda: I could not understand why you choose silly answer of rudhra as brainlist .
Rudhraa: coz he is my bestie
aravindjegan71: Thnk u
Rudhraa: ♥❤❤♥❣❣❣❤
alia2000chadda: but right anwer is only given by me
Rudhraa: the thing got deleted
Rudhraa: actually that person is my ❤
aravindjegan71: oh seri
aravindjegan71: super

Answers

Answered by alia2000chadda
6

I hope you mark my answer as brainlist..☺️

C++ provides a mechanism to ensure that a given function is limited to throw only a specified list of exceptions. An exception specification at the beginning of any function acts as a guarantee to the function's caller that the function will throw only the exceptions contained in the exception specification.

For example, a function:

void translate() throw(unknown_word,bad_grammar) { /* ... */ }

explicitly states that it will only throw exception objects whose types are unknown_word or bad_grammar, or any type derived from unknown_word or bad_grammar.

Similar questions