Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > BadData exception

Reply
Thread Tools

BadData exception

 
 
Roedy Green
Guest
Posts: n/a
 
      10-24-2003
If you did not roll your own specific exception, what flavour of
exception should you throw to indicate data in a file are not up to
snuff, e.g. invalid value, missing tag, unbalanced delimiters etc.?

Is IllegalArgumentException the best you can do?

Would it be reasonable to treat them as a species of IOException?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      10-25-2003
Roedy Green wrote:
> If you did not roll your own specific exception, what flavour of
> exception should you throw to indicate data in a file are not up to
> snuff, e.g. invalid value, missing tag, unbalanced delimiters etc.?
>
> Is IllegalArgumentException the best you can do?
>
> Would it be reasonable to treat them as a species of IOException?


Considering that UTFDataFormatException extends IOException,
it would appear that others agree with your approach.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Throw Exception Vs Throw New Exception Kerri ASP .Net 2 10-27-2003 02:13 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 3 06-26-2003 01:02 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 0 06-24-2003 12:46 PM



Advertisments