IT Community - Software Programming, Web Development and Technical Support

Difference between exception and error

This is a discussion on Difference between exception and error within the Java Programming forums, part of the Software Development category; Difference between exception and error The exception class defines mild error conditions that your program encounters. Ex: Arithmetic Exception, FilenotFound ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-20-2007, 11:17 PM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Difference between exception and error

Difference between exception and error

The exception class defines mild error conditions that your program encounters.
Ex: Arithmetic Exception, FilenotFound exception
Exceptions can occur when
-- try to open the file, which does not exist
-- the network connection is disrupted
-- operands being manipulated are out of prescribed ranges
-- the class file you are interested in loading is missing
The error class defines serious error conditions that you should not attempt to recover from. In most cases it is advisable to let the program terminate when such an error is encountered.
Ex: Running out of memory error, Stack overflow error.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-13-2008, 04:02 AM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: Difference between exception and error

Hi,
When u have doubts whether the value is there or file exists or record exists..
in these situations u can get exception,
U have to use try,catch block to handle the exception..
Sometype of exceptions are Arithmetic exception, NumberFormatException, ArrayIndexOutOfBoundException,FileNotFoundExceptio n etc...


MeanWhile the error is the one which u get by assigning character value to integer (cannot convert char to int datatype),semicolon missing,Indefinite for loop these are the mistake done by the programmer.. These leads to error..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-28-2008, 10:51 PM
Daccara Daccara is offline
D-Web Trainee
 
Join Date: Jul 2008
Posts: 8
Daccara is on a distinguished road
Default Re: Difference between exception and error

exception error means handle error. exception are use handle error using catch and throw .
error means some thing happening wrong in program.

__________________________________________________ _
web design company
free templates
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: command line error MIDL1001 : cannot open input file wincodec.idl midl Mramesh C# Programming 0 02-18-2008 10:07 PM
Difference between adhoc testing and error guessing? Shanthi Software Testing 1 11-16-2007 03:36 AM
How can we Handle Exception in VB.Net? anbuchezhians VB.NET Programming 2 09-10-2007 04:19 AM
difference between error and an exception? Arun Java Programming 4 08-18-2007 03:58 AM
Can u Explain Exception Handling Techniques in ASP.NET 2005 using error events? Archer ASP and ASP.NET Programming 1 07-25-2007 02:19 AM


All times are GMT -7. The time now is 02:45 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0