• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Types of Errors

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please I willlike to know more about the errors in Java: Runtime, compilation, fatal, non-fatal and logic errors. thanks
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Welcome Ekwem to Javaranch

Here in Java , we call errors as exceptions. chk out the Tutorial
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Exceptions" are a specific kind of error signal that occurs while a program is running.

Compilation errors are error messages reported by the compiler, long before your program runs.

"Logic errors" are mistakes you make in your thinking as you write a program. They may never be reported.

"Fatal" errors would be those that make a program or process terminate ; a non-fatal error would be an error that's ... not fatal.




 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ekwem

I literally have to make it short, for the obvious reasons.

As Balu said errors in java are termed as exceptions. Also the main class is Throwable , whiich can furthur be divided in to

- Exceptions
- Errors

Exceptions can further be checked(checked by the compiler to see whether they are appropriately caught or not) and unchecked .

Errors on the other hand, can be caught by the Runtime environment (or rather should be)

For details you can refer to

- Complete Reference

- K&B
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the delay; while I was having dinner everybody else was writing.

Welcome to JavaRanch ( ) and what an interesting first question.

The least serious type of error is the compiler error, because you have spelt something wrong, not paired off () [] {} <> correctly, used a variable “out of scope,” etc. etc. There are hundreds of potential causes for compiler errors. These are the best sort, because you find out about them soon and can correct them before they turn into more serious errors. In fact there were complaints that Java used not to support generics; that is a way of converting a runtime error to a compiler error. There are websites about compiler errors e.g. MindProd and many others.

More serious are runtime errors, which people have already told you about. As people said, most runtime errors show themselves by an Exception. Have a look at the Java™ Tutorials link in the first reply, and bookmark the Tutorials: that’s a good resource.

The most serious of all, because the application can continue to run, are logic errors. They can cause the application to run and produce a wrong result, which is why they are so dangerous.
 
reply
    Bookmark Topic Watch Topic
  • New Topic