expressions - Why exactly is the verb "to throw" used when an error occurs in the program?


Why don't we use "to generate" or "to get"?


E.g.: "External component has thrown an exception", "JavaScript had just thrown an error straight away", "Instances of Error objects are thrown when runtime errors occur".



Answer



see: https://en.wikipedia.org/wiki/Exception_handling at History


"... Software exception handling developed in Lisp in the 1960s and 1970s. This originated in LISP 1.5 (1962), where exceptions were caught by the ERRSET keyword, which returned NIL in case of an error, instead of terminating the program or entering the debugger.[10] Error raising was introduced in MacLisp in the late 1960s via the ERR keyword.[10] This was rapidly used not only for error raising, but for non-local control flow, and thus was augmented by two new keywords, CATCH and THROW (MacLisp June 1972), reserving ERRSET and ERR for error handling. ..."


Comments

Popular posts from this blog

commas - Does this sentence have too many subjunctives?

verbs - "Baby is creeping" vs. "baby is crawling" in AmE

time - English notation for hour, minutes and seconds

etymology - Origin of "s--t eating grin"

grammatical number - Use of lone apostrophe for plural?

etymology - Where does the phrase "doctored" originate?

single word requests - What do you call hypothetical inhabitants living on the Moon?