Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AssertionError

 
Deepak Sagar
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is throw new AssertionError is correct? please explain i am not understanding assertion properly. Where it can be used..
 
Cheenu Subramanian
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
throw new AssertionError is a valid statement. AssertionError behaves similar to the RuntimeExceptions.. so u r not expected to catch ther error.
 
Thomas De Vos
stable boy
Ranch Hand
Posts: 425
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible, but inappropriate to catch AssertionError's as those are RuntimeExceptions.

For more information about assertions see here
[ January 10, 2006: Message edited by: Thomas De Vos ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic