This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Exception

 
krishan go
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wat is the meaning of
if((((SQLException)e).getSQLState()) == false)
where e is an instance of SQLException


Krishan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks pretty meaningless to me.

getSQLState() returns a String which is the code is comparing with a boolean value.
 
krishan go
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya it was pretty stupid of me :p
 
krishan go
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actualy the statement is
if (ignoreSQLException(((SQLException)e).getSQLState()) == false)
how does ignoreSQLException return a boolean value...

forgive me for bein such a noob...
 
krishan go
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please reply...
wat does ignoresqlexception() do
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea. Its not part of the JDK. Who wrote it? You could ask them.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic