November 2019
Beginner
804 pages
20h 1m
English
The problem with throwing an exception in the getNewBookCollectionName method is that it changes the control flow of the application. The calling code will have to explicitly catch this exception if it wants to be able to react to it. However, since there is no notion such as checked exceptions in JavaScript and TypeScript, the calling code might not even know that an exception could be raised when calling the method!
We say that throwing exceptions changes the control flow because, ...
Read now
Unlock full access