`error` is generic, whereas `throw` can raise typed errors, such as
DomainError, SimdError, UVError, etc. which may have special handling --
for example, customized `show` methods to print help/suggestions to resolve
the specific situation.

(see also the examples here:
http://docs.julialang.org/en/latest/manual/control-flow/?highlight=error#the-try-catch-statement
)

On Fri, Aug 21, 2015 at 11:32 AM, Michele Zaffalon <
michele.zaffa...@gmail.com> wrote:

> In what cases should one use error() instead of throw()? The manual
> <http://docs.julialang.org/en/latest/manual/control-flow/?highlight=error#the-throw-function>
> is not particular clear about the difference:
>
> The error() function is used to produce an ErrorException that interrupts
> the normal flow of control.
>
>
> Isn't what throw is supposed to do?
>

Reply via email to