468,771 Members | 1,516 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

exception(logic error and runtime error)

Hello Experts!

I reading a book called programming with design pattern revealed
by Tomasz Muldner and here I read something that sound strange.

"Exception are divided into logic errors and runtime errors. Logic errors
represent static errors that
can be prevented and detected at compile time. Runtime errors represent
dynamic errors that can be detected only at runtime."

Now to my question what does it mean with "Logic errors represent static
errors that
can be prevented and detected at compile time." The compiler will not detect
if you index out of range
in an array so why does it then say that Logic errors represent static
errors that
can be prevented and detected at compile time. It exist an logic_error class
exception that has name out_of_range.

Many thanks

//Tony
Aug 13 '05 #1
0 1742

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by tarmat | last post: by
1 post views Thread by Mech | last post: by
2 posts views Thread by Yuki | last post: by
2 posts views Thread by shivp | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.