Top "Throw" questions

throw is a keyword in various languages used for signaling an exception.

What is the difference between `throw new Error` and `throw someObject`?

I want to write a common error handler which will catch custom errors thrown on purpose at any instance of …

javascript object error-handling exception-handling throw
Throwing exceptions from constructors

I'm having a debate with a co-worker about throwing exceptions from constructors, and thought I would like some feedback. Is …

c++ exception constructor throw
PHP Fatal error: Uncaught exception 'Exception'

I'm playing around with exceptions in PHP. For example, I have a script that reads a $_GET request and loads …

php exception throw
continuing execution after an exception is thrown in java

I'm trying to throw an exception (without using a try catch block) and my program finishes right after the exception …

java exception-handling throw
Why can I not throw inside a Promise.catch handler?

Why can't I just throw an Error inside the catch callback and let the process handle the error as if …

javascript asynchronous promise throw es6-promise
Is it okay to throw NullPointerException programmatically?

When there is a post-condition, that return value of a method must not be null, what can be done? I …

java exception-handling nullpointerexception throw
Is there a throws keyword in C# like in Java?

Possible Duplicate: how to use Java-style throws keyword in C#? i have a function where an exception occurs say for …

c# java exception throw throws
Difference between throw and throws in Java?

Can any one clearly state the difference between throw and throws in Java exception handling with an example? I have …

java throw throws
T-SQL Throw Exception

I am facing the famous 'Incorrect syntax' while using a THROW statement in a T-SQL stored procedure. I have Googled …

sql-server tsql throw
"rxjs" observable.throw is not a function - Angular4

I've been learning Angular 4 and everything was going smoothly until I tried to implement catch handling in a service. I'm …

angular rxjs observable throw