• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Raise an Exception from One StoredProcedure to another

 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Actually I am facing a problem in SP.

The One SP is as follows:



______________________________________

this was the calling unit which is calling another "callingSP". Now I have the "callingSP" which is throwing Exception: "NO_DETAIL_FOUND".

And when I receive this exception in "callingSP". I also write code e.g.



is this right or I should simply right



Or even in both cases when I return to main Calling Unit.. It's automatically entering in

block..


COuld anyone helps me to let me know how to pass one exception raised in one SP to another SP.

And one more thing is the macahinsm differs in case of Function .

If any further clarifications is required then please let me know..??

Early helps are appreciated..
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you sure your calling sp is raising NO_DETAIL_FOUND, just a suggestion try raising NO_RECORD_FOUND

Shailesh
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shailesh Chandra:
are you sure your calling sp is raising NO_DETAIL_FOUND, just a suggestion try raising NO_RECORD_FOUND

Shailesh


I took another alternative, actually what I was doing , I was raising an Object of User Defined Exception but it was local to each SP. So even although one SP was throwing User defined Exception, but it has been caught in general exception block.

Now What I have did exactly, I define this user defined exception globally and thus the problem has been solved.

I think this was the biggest mistake commited by me..this year...

Well Anyways Thankx a lot Dear Shailesh Chandra.. .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic