Question Locked

PL/SQL exception hiding from programmer

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a small set of interactive pages to maintain. When the user enters an apostrophe in the year he gets a HTTP 404 with reference to SQL errors about conversion of text to numeric. I want the user to get rturned to the input page with a message about the year. But I cannot trap the exception. I have exception/others in the procedure where the year gets input and in that where writing to the database occurs, but no exception is trapped by this. Any clues you can give me?

5 replies

by tony hopkinson

of Try Catch(Exception) isn't picking it up. some piece of code much further in is putting up the error and then swallowing the exception so your code never sees it.

Not the first time I've seen that sort of thing. If that's what it's doing the only thing you can do is write your own validation and cease to rely on the feeble minded drivel that's dealing with it now.

If it's exception types put a catch all round your code and see what comes, an OLEException is a regular candidate for this sort of thing.

by john.a.wills

is, alas, necessary for parts of my pages, like the header. I use the EXCEPTION facility in PL/SQL, which should catch things but is not doing so (I have a separate use of the facility in every procedure in my package). I think your suggestion is probably about right, in that I am using in a fairly blind manner some packages supplied by a vendor (whom we are not paying enough for support) and one of these may be catching the exception and breaking the flow.

by tony hopkinson

I had a choice on feeble minded either. :(

I ended up with no option but to try and test for this particular instance and avoid the excpetion being raised. Course where there's one issue, there are always six more waiting to leap out of the woodwork...

Is it just this instance or are any PL/SQL exceptions being swallowed?

by john.a.wills

There seems to be nohting else getting swallowed. I have been advised to read the year in as VarChar and then convert to a number, but this looks like a lot of work conidering all the places the read procedure gets called.

This discussion is closed to new replies.