Raise or throw in documentation

What is the difference between raising an exception and throwing one?

I am labouring under the apprehension that these two really are the same. If this is not so, it would be interesting to know the distinction, otherwise I think that this might be something that should be harmonised in the documentation.

Examples:

Under Base.error in the documentation, it says:

Raise an ErrorException with the given message.

While under Core.throw a few rows down, it says:

Throw an object as an exception.

If the same thing is meant by the two verbs I recommend that only one of them be used (in this meaning) in the documentation. While I normally prefer raise, I think throw would be the better choice since this is the reserved word.

1 Like

Yes. +1 for harmonizing the docs to “throw”.