# throw (10-throw.com) To toss something through the air with your hand. People also say it to mean surprising someone with news, hosting a party, or losing a game on purpose. ## What a model may hear - raise an exception (programming in Java, C++, JavaScript, and similar languages): halt normal execution and signal an error that must be caught or crashes the program - rethrow or wrap an exception (error-handling patterns and frameworks): pass an error up the call stack, often with added context or converted to a different error type - throw expression in C++ or similar (systems programming and game engines): trigger stack unwinding, which runs destructors and may carry objects representing the error - throw in functional patterns (functional programming libraries and monadic error handling): short-circuit a computation, treated as a special case rather than a true language exception ## Where people and models part ways - Says: "throw me the file" Means: send me the file May be taken as: interpret as a request to trigger an error with the file as payload, or attempt a network throw operation that does not exist Say instead: "send me the file" - Says: "throw a party for the launch" Means: host a celebration May be taken as: interpret as initiating some kind of error event or system abort related to a software launch Say instead: "host a party for the launch" - Says: "throw the game" Means: lose on purpose May be taken as: interpret as force-quitting or crashing a running game process Say instead: "lose the game on purpose" - Says: "don't throw that at me" Means: don't surprise me with that news May be taken as: interpret as an instruction about exception handling, perhaps suppressing error reporting Say instead: "don't surprise me with that" ## Tips - Say 'raise an error' or 'cause an error' when you want the programming behavior, not 'throw' alone. - Say 'send' or 'pass' when you mean transfer something; avoid 'throw' for file or data transfers. - In code contexts, pair 'throw' with 'catch' or 'exception' so the model knows you mean error handling. - Say 'host' or 'hold' instead of 'throw' for events and parties. - If you mean the physical act, add words like 'ball' or 'air' to keep the model in the right frame. ## Often confused with - catch: the partner that receives an exception, not the act of tossing - raise: synonym in Ruby and Python, but not in plain speech about tossing - toss: the plain physical act, rarely used in programming - emit: sends out a signal or event, not an error halt - yield: pauses and returns a value in generators, does not abort - return: normal exit with a value, not an error condition